You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nothing in the specification seems to explicitly reset pointer event state for an element, that would make hasPointerCapture() return false after an element is removed from the DOM, I think. I would expect this specification to hook into DOM's removing steps to reset some state when an element that has pointer capture is removed.
hasPointerCapture() would return false, because of https://w3c.github.io/pointerevents/#dom-element-haspointercapture
The spec is quite clear even though it is not using the removing steps. It explicitly says what happens when element isn't connected anymore. (but the relevant part should probably use MUST, not SHOULD)
OK, I think I found it. The text here: https://w3c.github.io/pointerevents/#ref-for-dfn-pending-pointer-capture-target-override-8 mentions that the pending pointer capture target override should be cleared when it is no longer connected to the DOM, which would make hasPointerCapture() return false on the disconnected element, and still true on a moveBefore()'d element (since it never becomes disconnected). Thank you! I'll close this issue.
Nothing in the specification seems to explicitly reset pointer event state for an element, that would make
hasPointerCapture()
return false after an element is removed from the DOM, I think. I would expect this specification to hook into DOM's removing steps to reset some state when an element that has pointer capture is removed.We came across this in the process of working on whatwg/dom#1307, and have this test: https://github.com/web-platform-tests/wpt/blob/master/dom/nodes/moveBefore/tentative/pointer-events.html
The text was updated successfully, but these errors were encountered: