Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone keyboard shrinks modal size for web application

I have a site that has a modal on it. When a div is clicked, the modal pops up. There is an input in the modal. When viewing the site on a mobile device, I have an issue where I when the input is clicked, the iPhone keyboard pops up. The modal appears to stay the same size, but if I then close the iPhone keyboard, the modal is shrunken to the screen size minus the keyboard size.

like image 554
maudulus Avatar asked Oct 31 '22 20:10

maudulus


1 Answers

There appears to be a bug with iOS and the rendering of position:fixed; elements when using the virtual keyboards.

You should try changing your modal to use position:absolute; and see if that corrects the issue.

You can also try the User Agent Sniffing method here.

like image 118
IMI Avatar answered Nov 02 '22 22:11

IMI