Sorry for sticking out the old post, but there seems to be no satisfactory answer, I thought I would add my 2cents to anyone who ends up here, like me.
Speaking about the general problem of scrolling in mobile WebApps, scrolling and dynamics in mobile browsers is a pain, because there are many different implementations depending on the platform: Android! = Chrome! = Safari! = Opera browser, etc. and Android <3 does not support scrolling and newer versions like iOS <5.
The situation is complicated and can be a problem for iOS, where most devices are on iOS 5 or 6, but this is a real problem with Android fragmentation.
To better understand this, you can read this .
To answer this, as you have already indicated, there are backups such as iScroll or more recently, Overthrow, so that you can better deal with your own JS implementations and reserves. More recently, the Financial Times team has published the FTScroller library, which also looks promising.
Now for your situation, if you want to support Android 4+ and iOS5 +, you should be able to work with momentum using only fixed positioning, and
overflow: auto; -webkit-overflow-scrolling: touch;
on your scrollable content (you do not need to specify "overflow-x: hidden" when using the auto property). If not, maybe you made a mistake in your fixed positioning or some other css layout property? (inherited details of the body, etc.).
UPDATE: I had to do this before posting my answer, but I just checked the script on my Nexus4 and your code really works in Chrome: this probably means that you tested on an older device without Android 4+ or with a browser that does not support the overflow property?
Side notes:
- note that while the default effect is active by default for android and iOS, this will be the specific momentum of the platform that will be applied: they are different from each other, unlike JS polyfill, which makes the platform independent of scrolling independent. In addition, on iOS, scrolling is much smoother than Android, although the situation has improved with newer devices and Android 4.0+ (before that it was painfully unsuitable for most heavy populated areas).
- In iOS, you will have a bounce effect, which is typical for the platform, but not on Android, since the native UX browser does not include this bounce effect (which is strange because this effect exists in other parts of OS UX, for example, settings). You can achieve this on Android using the library, but beware of the uncanny valley.
- Other problems exist even in newer browsers, such as the lack of a scroll position indicator in Android browsers, as indicated here: http://barrow.io/overflow-scrolling . On iOS, you may have a problem with the infamous effect of scrolling the rubber band over the entire page by scrolling inside certain elements, as described in " How do I disable the rubber band in the iOS network of the application? " You will have a similar pb for WP8 webApps.
All this suggests that something like scrolling is far from ideal in mobile WebApps, and this is even worse in WebViews in terms of performance (for example, when developing PhoneGap applications). Good luck