diff options
| author | Joren Van Onder <jov@odoo.com> | 2016-01-18 12:45:50 +0100 |
|---|---|---|
| committer | Joren Van Onder <jov@odoo.com> | 2016-01-19 09:32:27 +0100 |
| commit | 434fa814db7eadd86908403bc218a81976ede4d2 (patch) | |
| tree | 1a9d63a3fe564a88b07edde8bb317b9ecee00b57 /addons/web/static/src/js/framework | |
| parent | 12d9a34cf45502a002c1c26081e26cc3b3d79eb2 (diff) | |
[FIX] point_of_sale: stop body rubberbanding on IOS devices
Apple devices have a patented feature called rubberbanding that allows
the user to scroll past the end (or beginning) of a document. Browsers
on IOS have this same feature.
This is not an issue most of the time. But sometimes the rubberbanding
happens to the entire document.body of the POS, which is not
ideal. Rubberbanding is already disabled partially by
Chrome.disable_rubberbanding(). But it is not perfect. The most
important issue that remained is what happens when a scrollable element
is either at it's top or bottom and the user *initiates* a scroll past
its beginning or end. So scrolling an element all the way to the top and
then continuing to scroll did not trigger the problem. If however the
element was already at the top and you would initiate a scroll up the
scroll would fall through to the document instead and the entire POS
would scroll.
What aggrevates the issue from a UI point of view is that as long as the
rubberbanding animation is not finished, any subsequent scrolls will
target the entire document as well. Normal treatment of scrolling
resumes only when the animation has finished and the document is in the
center of the screen again.
Stopping this behavior is not trivial. The only know solutions are all
built around stopping touchmove events, which we already did.
This patch makes it so that we also stop all touchmove events that
trigger the unwanted behavior described above. It ensures that we stop
touchmove events that would scroll an element above it's top or below
it's bottom. To do this we have to manually determine whether or not the
element is scrolled all the way to the top or bottom and we have to
manually determine the direction the user is swiping.
Diffstat (limited to 'addons/web/static/src/js/framework')
0 files changed, 0 insertions, 0 deletions
