Prevent scrolling on body in iOS



When we develop a web page for mobile and we are creating a drawer to hold the content that will scroll separately, we can use overflow: hidden; on the body tag is sufficient to prevent scrolling a web page. However, this doesn’t work in iOS6.

I have found a best solution for this to set position: fixed.

body.lock-screen {
	height: 100%;
	overflow: hidden;
	width: 100%;
	position: fixed;
}