Answer the question
In order to leave comments, you need to log in
How to prevent body from scrolling on mobile/touch devices when overflow: hidden?
When opening a modal window with position:fixed, a class is added to the body with the parameter overflow: hidden and height: 100%. Only the content of the modal scrolls from the computer, but from the phone (tested on the iPhone and Windows Phone 8/8.1) the page itself will scroll (you can take the bootstrap modal window as an example ). How can I prevent page scrolling, leaving the ability to scroll inside the modal?
Answer the question
In order to leave comments, you need to log in
Specify meta tag
<meta name="viewport" content="width=device-width, initial-scale=1">
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question