Closed Bug 1317030 Opened 5 years ago Closed 5 years ago
Removing/reattaching an element from the DOM triggers spurious mouseenter events
When an element is detached and then reattached to the DOM while the mouse pointer is inside it, it triggers the mouseenter event unnecessarily. The mouseover event does not exhibit this behavior. STR: open the attached testcase. Move the mouse into the square. Move the mouse around. Compare to behavior in other browsers.
I need to write still automatic test for this. wpt can't deal with this kind of case, so it must be mochitest. https://treeherder.mozilla.org/#/jobs?repo=try&revision=4e5cb10aac2d724a5a2044cd569d2899842ebce8
Attachment #8810076 - Flags: review?(masayuki)
The idea with the patch is that we end up using the same recursion check what mouseover/out use.
Comment on attachment 8810076 [details] [diff] [review] patch If Dispatch() isn't called explicitly, should EnterLeaveDispatcher() call Dispatch() from the destructor? I think that it should do that, but up to you. Otherwise, looks okay.
Attachment #8810076 - Flags: review?(masayuki) → review+
I guess I could add dtor which just asserts that Dispatch has been called. Though, this is used only in two places so it should be rather obvious.
Haven't found a way to reproduce the issue automatically in mochitests :/
I think I pushed to try when m-i was anyhow broken. Trying again https://treeherder.mozilla.org/#/jobs?repo=try&revision=227e18990547789e15a27b2684e07be5ff618289
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/9cb1f00af10b Removing/reattaching an element from the DOM triggers spurious mouseenter events, r=masayuki
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.