I noticed that if one allows for scrolling in a text box, in iOS this behaviour extends to the entire viewport. In other words, when scrolling in a text box you may end up bouncing the viewport - not my idea of a web app.
Now, there is an easy way to prevent iOS Safari from bouncing:
Code: Select all
document.ontouchmove = function(event){
event.preventDefault();
}
There is an alternative: one could prevent an ontouchmove event from "bubbling up" from those divs that are supposed to scroll:
Code: Select all
elementYouWantToScroll.ontouchmove = function(e) {
e.stopPropagation();
};
-Franco