Re: [pointerevents] Release Implicit Capture, Capture at Ancestor Element (#327)

> 1. pointerdown on child
> 2. child calls hasPointerCapture and determines pointer is captured implicitly (touch)
> 3. child immediately calls releasePointerCapture
> 4. pointerdown bubbles to parent
> 5. Parent calls setPointerCapture
> 6. Parent processes pointermove events until pointerup, pointercancel, or lostpointercapture

Actually the events always bubble regarding of the explicit/implicit capturing. So if the child really doesn't care about any event they could just not have a handler. In other words, your code should work event if you remove the first 3 steps. So for the touch case at first implicit capture goes to the child. Then when the event bubbles and parent calls setpointercapture it effectively steals the capture and after that child will not get the event (as it is not in the propagation path anymore).


> With touch and implicit capture on pointerdown, however, this does not work (only tested on iOS Safari/Firefox/Chrome/Chromium Edge so far). While the gotpointercapture events indicate the parent received capture, the pointermove/pointerup events following capture are not targeted to the parent - in other words, the parent never really got capture. pointermove/pointerup events outside the parent cease, instead of continuing like they should when an element has a pointer captured.

This could be a bug in WebKit. One thing I can suggest is to try this on your desktop or on an Android and see if that passes. I expect it to pass.  If it did we can then file a bug for Webkit I guess.

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


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

Received on Tuesday, 11 August 2020 21:19:27 UTC