Re: [pointerevents] Should pointerover and pointerenter work on mobile? (#346)

What Patrick mentioned is correct for most of the cases we see developers report. Actually that is what I suspected at first as well. But in your particular case there is another reason as you indeed keep getting the pointermoves so there is no pointercancel going on. So as far as I tested the touch-action none would not solve the issue for you.

You are seeing what is specified as an [implicit pointer capture](https://w3c.github.io/pointerevents/#implicit-pointer-capture) for touch pointers in the spec which makes what you see working as intended. Adding this code to your sample page removes the capture and makes the behavior the way you expect. Basically I'm removing the capture as soon as I see one on the cells you work with.

`cells.forEach(n => n.addEventListener('gotpointercapture', e => e.target.releasePointerCapture(e.pointerId)));`

But I need to mention a **big caveat** this solution has. Basically you are asking the browser to continue hit-testing for you for all incoming pointer events and that does make things generally slower (but maybe not as much as you notice in your testing). So something to be aware of and actually saving this hit-testing time was the reason we introduced the implicit pointer capture at first.

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


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

Received on Tuesday, 12 January 2021 18:16:36 UTC