Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Intent to Ship: Standardized pointer boundary event behavior when the last `pointerover` target is removed

48 views
Skip to first unread message

Masayuki Nakano

unread,
Jan 5, 2025, 11:54:11 PMJan 5
to dev-pl...@mozilla.org

Summary: Previously, Gecko forgot the last `pointerover` (and `mouseover`) target when it's removed before the pointer (mouse cursor) is moved outside of the target. Therefore, `pointerenter` events will be fired on all ancestor elements of the new `pointerover` target when the pointer moves next time. The new behavior is, Gecko keeps storing a parent element of the removed last `pointerover` target as the deepest last `pointerenter` target. Therefore, redundant `pointerenter` events won't be fired in the case.

Bug: <https://bugzilla.mozilla.org/show_bug.cgi?id=1938528> and <https://bugzilla.mozilla.org/show_bug.cgi?id=1875424>

Specification: <https://w3c.github.io/pointerevents/#dfn-fire-a-pointer-event> (Especially, the last paragraph beginning with "Save the determined target as the previousTarget for the given pointer,")

Platform coverage: All

Preference: `dom.events.mouse-pointer-boundary.keep-enter-targets-after-over-target-removed`

DevTools bug: N/A

Other browsers: Chrome already passes the tests in all channels, but Safari does not pass the tests in any channels.

web-platform-tests: <https://wpt.fyi/results/pointerevents/pointerevent_after_target_removed.html%3Fmouse>

-- 
Masayuki Nakano <masa...@d-toybox.com>
Working on DOM, Events, editor and IME handling for Gecko
Reply all
Reply to author
Forward
0 new messages