Re: [pointerevents] touch-action and scrolling directional lock (#303)

I have just completed my investigation, and concluded that I misrepresented those WPTs in my two recent comments 🤦🏼‍♂️!

> ... expects a down-then-right swipe gesture to pan the page in the second half of the swipe

**Correct interpretation:** the test injects a "down" gesture followed by a _separate_ "right" gesture.  Same with other similar tests: they inject separate gestures, and never an L-shaped gesture.  So the tests are working as intended.

My conclusion:

1. The spec is fine today because [Sec 8.2](https://w3c.github.io/pointerevents/#determining-supported-direct-manipulation-behavior) talks about single-finger interaction only.  Developers still need to abort their custom gesture handling on `pointercancel` because a single-finger interaction can turn into a two-finger one at any moment.  I will leave this issue open in case this needs to be called out as a note or something.

2. Both Chrome and Firefox show the railing behavior we discussed earlier here, i.e., the first move outside slop determines the pan direction (as long as it remains a single-finger interaction of course).  Therefore, @patrickhlauke's [touch-action-scrolling](https://patrickhlauke.github.io/touch/touch-action-scrolling/) demo on `pan-x` works exactly how @flackr argued today with his developer's hat on.  Safari doesn't have railing behavior, so any little left-right movement kicks off a browser panning action.

3. Existing WPTs are all fine.  We need new WPTs for zigzag gestures.

4. The `pointercancel` event seems to be the only guaranteed signal for developers to detect the browser taking over control, because of the possibility of one- to two-finger transition mentioned above.  Along the same line, I also confirmed that the browser may fire a `pointermove` way outside the slop region before the `pointercancel`: a fast flick [here](https://rbyers.github.io/eventTest.html) on `touch-action: auto` easily causes a `pointermove` event as far as 100px off from the `pointerdown`.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 7 June 2023 20:52:42 UTC