At the risk of duplicating my post, I am trying to solve the same problem, and so far I am only so far away:
$(document).bind("touchmove",function(e){ e.preventDefault(); }); $('.scrollable').bind("touchmove",function(e){ e.stopPropagation(); });
This works if you have an overflow element that does not cover the entire screen, for example, in the iPad application. but it doesn’t work if you have a mobile application and the entire viewport is covered with your overflowing element.
The only thing I could think of is checking scrollTop () for $ ('. Scrollable'), and then conditionally link preventDefault () if it is 0.
After trying, I noticed that webkit UA tells scrollTop always as 0 when the element scrolls up, even when it performs an “internal bounce” of the native overflow scroll. Therefore, I cannot do anything, since I will need a negative scrollTop to set my condition.
Sigh. Disappointment.
tim 05 Sep '12 at 22:52 2012-09-05 22:52
source share