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
Should touchstart on drag be preventDefault’d? #1373
Comments
Related: should the suppressed click be stopPropagation’d as well? Currently we just preventDefault. |
just realized that we'd probably would want |
Well, just looking now, and it definitely appears that we must suppress touchstart’s default behavior on iOS, or dragging is basically useless because it will trigger scrolling (panning or pinch-zooming). And since we have to disable touchstart at the start of the gesture, there’s no way to not re-enable the click if that touch gesture doesn’t result in any movement. |
did you consider suppressing |
I tried suppressing touchmove and it didn’t seem to have any effect (using iOS Simulator). |
also added an alert on click which works for me with |
Thanks for that! I figured out what was going on and have fixed it in ba1a411, which now prevents default on touchmove rather than touchstart. It does seem, though, that any preventDefault on touchmove also prevents the subsequent click from firing (not just the browser’s default behavior), but I think that’s probably okay. |
See #1341.
The text was updated successfully, but these errors were encountered: