iOS 5 brought a lot of nice stuff to JavaScript / Web Apps. One of them is improved scrolling. If you add
-webkit-overflow-scroll:touch;
in the style of the textarea element, scrolling will work with one finger.
But there's a problem. To prevent the entire screen from scrolling, it is recommended that web applications add this line of code:
document.ontouchmove = function(e) {e.preventDefault()};
This, however, disables the new scroll.
Does anyone have a good way to allow new scrolling in a text box but not allow scrolling of the entire form?
javascript scroll ios5
ghenne Oct 17 '11 at 18:56 2011-10-17 18:56
source share