How to prevent iOS keyboard from pushing the view off screen with CSS or JS
<p>I have a responsive web page that opens a modal when you tap a button. When the modal opens, it is set to take up the full width and height of the page using fixed positioning. The modal also has an input field in it.</p>

<p>On iOS devices, when the input field is focused, the keyboard opens. However, when it opens, it actually pushes the full document up out of the way such that half of my page goes above the top of the viewport. I can confirm that the actual <code>html</code> tag itself has been pushed up to compensate for the keyboard and that it has not happened via CSS or JavaScript.</p>

<p>Has anyone seen this before and, if so, is there a way to prevent it, or reposition things after the keyboard has opened? It's a problem because I need users to be able to see content at the top of the modal while, simultaneously, I'd like to auto-focus the input field.</p>