-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dispatch of pointerover+pointerenter and pointerout+pointerleave in relation to related mouse events is not clearly specified #279
Comments
The spec used to be similar to what you expected. But due to this issue we had to change to make it to the current state. Can you take a look at that issue and let me know whether you have more concerns or not? |
Just to confirm @NavidZ, you're saying the spec does not mandate either of the cases I describe and both are accepted? I don't think it's a big interop issues because content using pointer events and content using mouse events will get a similar sequence of events in both cases. If so, happy to close this issue as a duplicate. |
The specific event sequence mentioned in the spec is only a suggestion (couched in MAYs and SHOULDs) per the section 11 intro https://www.w3.org/TR/pointerevents/#compatibility-mapping-with-mouse-events
The suggested order of events in https://www.w3.org/TR/pointerevents/#mapping-for-devices-that-do-not-support-hover is further inside a note, which in this spec is treated as non-normative. |
As @patrickhlauke said there is no mandate on that ordering. However, I can tell you some back history of what caused to do this. Basically depending on how the UA generates the compatibility mouse events the boundary events (say |
If I write a test that listens to
pointerover
andpointerenter
as well as the mouse eventsmouseover
andmouseenter
I get this sequence in both Firefox and Chrome:pointerover
pointerenter
mouseover
mouseenter
However, I'm not sure the spec says why this would be the correct behavior instead of:
pointerover
mouseover
pointerenter
mouseenter
Should the spec clearly state how those related events are ordered?
The same applies to
pointerout
,pointerleave
,mouseout
andmouseleave
.The text was updated successfully, but these errors were encountered: