This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
When a mouse cursor is moved over an element, three events are fired (in some order): * mouseover * mouseenter * mousemove Possible orders include: (1) mouseover -> mouseenter -> mousemove (2) mousenter -> mouseover -> mousemove (3) mousemove -> mouseover -> mouseenter The spec suggests (non-normatively, AIUI) order (1). According to [1] (and some of my own testing), Gecko uses order (1). Opera uses order (2), which is IMO the most logical. IE uses order (3). Chrome and Safari could use either order (1) or order (2), as neither currently fires the mouseenter event. (I'm told a patch has recently landed for Chrome support, but I haven't verified what order that implements.) Interestingly enough, Opera seem to agree that the canonical order for the reverse is (4): (4) mousemove -> mouseout -> mouseleave As before, Chrome and Opera do not fire the mouseleave event, but otherwise maintain the order in (4). I didn't test IE. The spec should say definitively, and not just in some examples or suggestions, what the canonical order should be. [1] http://rodneyrehm.github.io/select-events/
(In reply to comment #0) > Interestingly enough, Opera seem to agree that the canonical order for the > reverse is (4): > > (4) mousemove -> mouseout -> mouseleave > > As before, Chrome and Opera do not fire the mouseleave event, but otherwise > maintain the order in (4). I didn't test IE. Wow, lots of typos. That first line should say "Gecko and Opera" and that second line should say "Chrome and Safari".
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-mouseevent-event-order and Gecko follows that. Feel free to re-open if there is something unclear in the spec. The order of mouseover/enter and mouseout/leave should be clear.
That isn't normative.
The Chrome implementation is here: http://src.chromium.org/viewvc/blink?view=revision&revision=153877 According to [1], Chrome seems to use order (2) from comment 0 for the entry (like Opera), but order (5) below for the exit: (5) mouseleave -> mouseout (I didn't test this myself, so I don't know where 'mousemove' falls into the order.) [1]: http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/mouseenter-mouseleave-expected.txt?pathrev=153877
I've updated the text in the ED to mark the over - enter - move - out - leave order as normative. FF and IE both use the above order. IE also has a single extra move before the over, which we are having them investigate. We believe that it is there to work around some issues with touch devices, but we'll track that as a separate issue if needed. Safari 6.0.5 and Chrome 29 don't yet have enter/leave. For reference/testing browser mouse events, I created: https://dvcs.w3.org/hg/d4e/raw-file/tip/mouse-event-test.html