w3c / pointerevents

Pointer Events
https://w3c.github.io/pointerevents/
Other
68 stars 34 forks source link

[PointerEvent algorithms] Order of boundary events #519

Open mustaqahmed opened 1 month ago

mustaqahmed commented 1 month ago

When the mouse pointer moves from element A to element B, how does a browser determine the sequence of boundary events (enter, leave, over, out) to fire?

Problem

PointerEvents boundary event (enter, leave, over, out) dispatch is not defined, and the corresponding dispatch mechanism in UIEvents Section 3.4.4. Mouse Event Order is example-based without a precise definition text.

Possible solution

Fix https://github.com/w3c/uievents/issues/383, then override that in PointerEvents into three different methods (one per pointer type) each with a corresponding state for "element under current primary pointer".

mustaqahmed commented 1 month ago

FYI: @garykac @flackr @smaug----

smaug---- commented 1 month ago

https://w3c.github.io/uievents/#handle-native-mouse-move-id has some of this defined in an algorithmic way for mouse events.