-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Chrome and Native Browser - scrolling cancels touchmove events #50
Comments
My results on Android 4.1.2: Chrome/Opera - one "move" per touch |
Related: madrobby/zepto@d945672 |
Also related: https://code.google.com/p/android/issues/detail?id=19827 |
Looks like the common fix is to check the delta on pageX and pageY and only preventDefault if over a certain threshold. |
Chrome has never just stopped sending touch events, it sent |
Summary:
When trying to use touchmove events to say, drag a carousel slide from left to right, browsers like iOS Safari will allow you to keep default event handling enabled, so you can still scroll the page vertically while dragging an element horizontally.
Android Chrome and the native browser don't seem to allow this. The
touchmove
event fires a couple of times and then stops. The only workaround I can find is toevent.preventDefault
, which disallows the ability to scroll the page behind a draggable component. If the component is large enough, preventing default could render a page completely unusable, and at best, a user would need to know that they have to start their scroll gesture outside the bounds of a draggable component.Platforms:
How to reproduce:
(test the same URL in iOS Safari or even Chrome on a Mac with touch events enabled, and you'll see the desired result.)
Bug Tracker ticket(s):
Workarounds:
The text was updated successfully, but these errors were encountered: