Sadly--and please correct me if I'm wrong on this--there is no way to use that same trick on Android/iOS without painfully-and-likely-poorly reimplementing the browser's scrolling mechanism (as you don't get events and cannot render while the user is manipulating the native viewport).
Yeah, I get the events on iOS if I turn off touch scrolling, but I don't get the nice, smooth scrolling. I don't know how it works on Android.
However, on iOS, I can't seem to disable the bounce scrolling of the entire screen if I have any scrollable areas on the screen. So I ended up writing a decorator for overflow:auto elements that re-implements touch scrolling. And does a preventDefault() as necessary to prevent the bounce of the app.
Here is a gist of the decorator:
https://gist.github.com/3086981
and I've updated the original gist to include the ScrollController.
It works on the iPad, but I can't vouch for android. (This code is from a little weekend project.)
Edit: I didn't implement rubber banding or anything. It's just a quick and dirty scroll with some inertia based on a weighted average velocity of the last two touchmove events. It doesn't feel too bad, but it isn't perfect.
Just checked that one out, and I'm somewhat floored that it isn't obvious to you that it reimplemented the scrolling behavior: the rubber-banding and acceleration curves are wrong, and it scrolls to logical pixel boundaries (the native scrolling can move one physical pixel, while this framework moves by two as the minimum step). It is much better than what I've seen previously, though; makes me wonder if the CPU on the 4S combined with the latest WebKit+Nitro really is now enough to emulate scrolling well (assuming someone attended better to the details). Thanks!
It was quite obvious it emulates the scrollbars on the desktop, but i have no iphone, and made no such assumption about what it actually does on mobile.
Ive been following Qooxdoo for quite some time, and the level of browser normalisation ( from keyboard events to how scrollbars render ) is insane.
And so is the performance, and the tricks they pull. For example: they recyle dom nodes. They have different array looping constructs based on the target platform. They emulate their own event bubbling system. There is a whole range of performance tests you can try on their website as well.
The real question is, can we get this kind of performance with more idiomatic html/css.