Closed
Bug 1317030
Opened 8 years ago
Closed 8 years ago
Removing/reattaching an element from the DOM triggers spurious mouseenter events
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: abr, Assigned: smaug)
Details
Attachments
(2 files)
380 bytes,
text/html
|
Details | |
1.99 KB,
patch
|
masayuki
:
review+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Updated•8 years ago
|
Component: DOM: Events → Event Handling
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bugs
Assignee | ||
Comment 1•8 years ago
|
||
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)
Assignee | ||
Comment 2•8 years ago
|
||
The idea with the patch is that we end up using the same recursion check what mouseover/out use.
Comment 3•8 years ago
|
||
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+
Assignee | ||
Comment 4•8 years ago
|
||
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.
Assignee | ||
Comment 5•8 years ago
|
||
Haven't found a way to reproduce the issue automatically in mochitests :/
Assignee | ||
Comment 6•8 years ago
|
||
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 opettay@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/9cb1f00af10b Removing/reattaching an element from the DOM triggers spurious mouseenter events, r=masayuki
Comment 8•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9cb1f00af10b
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•