[Webkit-unassigned] [Bug 220196] [iOS] #setPointerCapture does not dispatch pointer events outside element boundary

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 23 18:05:12 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=220196

--- Comment #2 from Mark Salsbery <msalsbery at hotmail.com> ---
I have a similar, related issue...first discussed with the Pointer Events Working Group here (https://github.com/w3c/pointerevents/issues/327)

To reproduce: A parent and a child element, both with pointerdown event handlers. Depending on application's need, when a pointerdown occurs on the child, it should be ignored and the parent (when pointer down bubbles) will want to capture the pointer:

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

Sample page here: https://openseadragon-imaging.github.io/old-demo/test.html

The grey box is the parent, green box is child (from my original description)

If the pointerdown is initiated on the child (green box) in a Webkit browser, the parent (grey box) doesn't truly get capture despite the gotpointercapture event indicating it does...this is shown by the inability to drag the parent if pointer moves outside of the container (black) element (and perhaps worst of all, if pointerup occurs outside of the parent element it's never dispatched to the parent).

The way the W3C Implicit Pointer Capture docs read to me, this should be a reasonable approach. The docs (https://www.w3.org/TR/pointerevents2/#implicit-pointer-capture) state:

Direct manipulation devices should behave exactly as if setPointerCapture was called on the target element just before the invocation of any pointerdown listeners. The hasPointerCapture API may be used (eg. within any pointerdown listener) to determine whether this has occurred. If releasePointerCapture is not called for the pointer before the next pointer event is fired, then a gotpointercapture event will be dispatched to the target (as normal) indicating that capture is active

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210324/b6f4a09a/attachment-0001.htm>


More information about the webkit-unassigned mailing list