Improving TouchScroller to allow native document level scrolling when appropriate. If the scrollable widget is scrolled as far as it can go in a direction, and the user tries to scroll in that direction, then we defer to document level scrolling. For example, in the Showcase app (which is not a mobile specific app), if you scroll the menu bar to the bottom, then scrolling it again allows the document to scroll down, revealing the rest of the page. It isn't perfect because we cannot disable native scrolling in one direction (as in, allow native horizontal but disable native vertical), but its a drastic improvement and make Showcase usable on mobile.

This change also fixes a bug in TouchScroller where it always busts the next click, even if Momentum has finished. The next click should only be busted if the user interupts momentum to stop it. Also, we cancel momentum on WindowResize (and by extension, orientation change) to account for the fact that resizing the scrollable widget will cause the contents to reflow, and the old scroll positions become stale.

Review at http://gwt-code-reviews.appspot.com/1410803

Review by: pdr@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9988 8db76d5a-ed1c-0410-87a9-c151d255dfc7
2 files changed