[pointerevents] [MouseEvent algorithms] Boundary event dispatch needs to be tied to native down and up events (#620)

mustaqahmed has just created a new issue for https://github.com/w3c/pointerevents:

== [MouseEvent algorithms] Boundary event dispatch needs to be tied to native down and up events ==
Mouse boundary event (mouseenter/leave/over/out) dispatch is currently tracked using the state variable [`last_mouse_element`](https://w3c.github.io/uievents/#last-mouse-element).  The variable is checked and updated only in [Section 3.4.3.15. handle native mouse move](https://w3c.github.io/uievents/#handle-native-mouse-move-id).

Native mousedown and mouseup events should check and update the variable too: a mousedown always follows a mouseenter and mouseover to the same target in all major browsers.

### Possible solution
Rewrite [Section 3.4.4. Mouse Event Order](https://w3c.github.io/uievents/#events-mouseevent-event-order) into a method named `updateElementUnderMouse` which will check and update the variable and fire all required boundary events.  Call this from native mouse event handlers.

Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/620 using your GitHub account


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

Received on Monday, 12 January 2026 22:04:35 UTC