Bug 186094
| Summary: | mouseout and mouseleave should not be dispatched on removed DOM node | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Robert Flack <flackr> |
| Component: | UI Events | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | cdumez, dbates, judeelliot2, rniwa, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 11 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Robert Flack
Visit http://output.jsbin.com/sekaqit
Move the mouse over the gray hover me box
The mouseenter listener removes the gray box
According to https://www.w3.org/TR/uievents/#events-mouseevent-event-order:
If the event target (e.g. the target element) is removed from the DOM during the mouse events sequence, the remaining events of the sequence MUST NOT be fired on that element.
However, in Safari the mouseout and mouseleave events are fired. If you delay removing the DOM node, they are fired the next time the mouse is moved.
If my reading of the spec is correct, Safari should not be dispatching mouseout and mouseleave on the removed node.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/40693039>
DavidRushton
Most DOM events do bubble, however, there are a few exemptions. The mouse enter and mouse leave events don't bubble, however, mouseover and mouseout are the percolating partners. The concentration and obscure occasions don't bubble, however on standardizes focusing and focus out as foaming reciprocals. https://www.assignmentland.co.uk
Ryosuke Niwa
WebKit's behavior matches that of Gecko but not Chrome. We'd have to figure out which one is more web compatible. The spec's text is probably irrelevant here (in that we should be changing the spec to whichever way that is more web compatible).
Lucas Forschler
Mass move bugs into the DOM component.
Ryosuke Niwa
*** This bug has been marked as a duplicate of bug 156971 ***