×

html - iOS 12 is not preventing the scrolling of a document under fixed positioned overlay

html - iOS 12 is not preventing the scrolling of a document under fixed positioned overlay

Live demo: https://whimsical-surfboard.glitch.me/



The expected behavior of this demo is: scrolling of a document is prevented because it's under the overlay.



The live demo works as expected in desktop browsers, Android, and iOS 11. But iOS 12 seems to behave differently and scrolls a document.



Here's the minimal styles:



body
overflow-y: hidden;

#backdrop
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0, 0, 0, .2);



Source code is here, click "remix this" to fork it: https://glitch.com/edit/#!/whimsical-surfboard



The question is: how to make iOS 12 behave the same way as other browsers, i.e. prevent the scrolling.





Source link

Read the full article

Satoshi Nakamoto