I'm working on a browser based app, currently I'm developing and styling for the ipad safari browser.
I'm looking for two things on the ipad: How can I disable vertical scrolling for pages that don't require it? & how can I disable the elastic bounce effect?
You can use js for prevent scroll:
And than just run/stop
toggleScroll
func when you opnen/close modal.Like this
toggleScroll(true) / toggleScroll(false)
(This is only for iOS, on Android not working)
Similar to angry kiwi I got it to work using height rather than position:
On container you can set bounce effect inside element
Source: http://www.kylejlarson.com/blog/2011/fixed-elements-and-scrolling-divs-in-ios-5/
Tested in iphone. Just use this css on target element container and it will change the scrolling behaviour, which stops when finger leaves the screen.
https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-overflow-scrolling
Try this JS sollutuion:
Prevents default Safari scrolling and bounce gestures without detaching your touch event listeners.
Code to To remove ipad safari: disable scrolling, and bounce effect
If you have canvas tag inside document, sometime it will affect the usability of object inside Canvas(example: movement of object); so add below code to fix it.