-
Notifications
You must be signed in to change notification settings - Fork 26
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
Automatically set touch-action: none #214
Comments
Putting this here for reference - might be good to see how Hammer.JS handles this: http://hammerjs.github.io/touch-action |
Sounds like they auto-set it based on a combination of which gesture you're listening to and what parameters are passed in. Have you played with Hammer and its |
💻 I'm working on a diff at http://codereview.cc/D3151 |
http://crbug.com/717796 was marked Maybe we should. It defeats the point of having If @jverkoey's proposal to add |
There's a maddening property of PointerEvents: touch only triggers one
move
unless you settouch-action
. I know this and it still bites me occasionally - I imagine it's even more frustrating for people who haven't worked with touch before.Here's a potential solution:
style.touchAction
andgetComputedStyle(target).touchAction
forauto
auto
, cache the current value, then setstyle.touchAction = none
drag
is completed, revert the style change.It does the right thing for the most common situtation and deflect to the author's decision if one has been made. Still, if that's too magical, we can also try this:
NODE_ENV !== production
, usegetComputedStyle
to assert thattouchAction !== auto
, and log a warning if it is.The text was updated successfully, but these errors were encountered: