Re: [pointerevents] touch-action doesn't allow for press-hold-drag UX (#178)

I have a similar issue when trying to implement a custom horizontal pan gesture. I have a `pointerdown` event handler that subscribes to `pointermove` and `pointerup` events once triggered. In the `pointermove` handler I check how far and in what direction the user has moved the pointer. If the direction is horizontal I "start" the gesture. At this moment I want to disable default behaviour such as scrolling. I wish I could simply set `touch-action: none` to the scrollable element, but unfortunately it doesn't work as `pointerdown` event was already fired. As a result, I have to use non-passive event so I can call `event.preventDefault()` which hurts performance.

-- 
GitHub Notification of comment by dmitryshimkin
Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/178#issuecomment-562137885 using your GitHub account

Received on Thursday, 5 December 2019 13:53:47 UTC