Have you ever tried to disable page scroll when a modal window is opened?
CSS:
html {
height: 100%;
}
body.disable-scroll {
position: fixed;
height: 100%;
overflow: hidden;
}
HTML:
<!DOCTYPE html>
<html>
<head>
<title>Unique Parcel Sandbox</title>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport">
</head>
<body class="disable-scroll">
<div class="page-content">
<input type="text">
... more unique content ...
</div>
</body>
</html>
However, on IOS Safari, the scroll becomes enabled after the virtual keyboard is opened. It scrolls even more than
window.innerHeight + window.scrollX
, creating a blank gap at the bottom of the page.
https://i.sstatic.net/X7Vy3.jpg
Check out the editor's URL here: https://codesandbox.io/s/condescending-snow-skuo5?fontsize=14
For a fullscreen experience on your iPhone, visit:
Open it on your iPhone or in XCode with IOS 12+, try scrolling, then focus on an input and try scrolling again.