Bug 186094 - mouseout and mouseleave should not be dispatched on removed DOM node
Summary: mouseout and mouseleave should not be dispatched on removed DOM node
Status: RESOLVED DUPLICATE of bug 156971
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 11
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-05-30 07:43 PDT by Robert Flack
Modified: 2019-02-06 21:54 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Flack 2018-05-30 07:43:48 PDT
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.
Comment 1 Radar WebKit Bug Importer 2018-05-31 11:31:06 PDT
<rdar://problem/40693039>
Comment 2 DavidRushton 2019-01-24 04:52:51 PST
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
Comment 3 Ryosuke Niwa 2019-01-24 19:51:46 PST
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).
Comment 4 Lucas Forschler 2019-02-06 09:19:13 PST
Mass move bugs into the DOM component.
Comment 5 Ryosuke Niwa 2019-02-06 21:05:32 PST

*** This bug has been marked as a duplicate of bug 156971 ***