w3c / uievents

UI Events
https://w3c.github.io/uievents/
Other
145 stars 52 forks source link

Dispatch mouseenter/leave/out/over when the layout (or scroll) changes #154

Closed dtapuska closed 6 years ago

dtapuska commented 7 years ago

Add text to ensure that when a layout or scroll changes mousenter/leave/out/over MUST be dispatched.

A user agent may select to dispatch them shortly after the action is completed for say a scroll action it does not make sense to dispatch them until the user agent has determined the scroll to end.

RByers commented 7 years ago

Anything you can link to here about existing browser behavior and web compat impact (eg. example sites/developers preferring this behavior)?

triple-underscore commented 6 years ago

I have a question relating the referenced commit https://github.com/w3c/uievents/pull/155/files, for example, mouseover.

The spec says:

A user agent MUST dispatch this event when a pointing device is moved onto the boundaries of an element or when the element is moved to be underneath the primary pointing device.

Thus, moving an element underneath a non-primary pointing device doesn't imply any mouseover event.

But I wonder whether such moving also silently update “current” element underneath that non-primary pointing device, or

keep the previous underneath one, so that mouseover event will be fired if, after such moving, the pointer has moved inside that moved element.

dtapuska commented 6 years ago

Non primary pointing devices don't end up firing mouse events. (see https://w3c.github.io/pointerevents/#dfn-primary-pointer)

triple-underscore commented 6 years ago

dtapuska, thanks a lot! I understood.