Bug 156971

Summary: Mouseleave fires on elements no longer in the DOM
Product: WebKit Reporter: Becky Conning <becky.conning+webkit-bugzilla>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, a_protyasha, buildbot, cdumez, ddkilzer, flackr, rniwa, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari Technology Preview   
Hardware: Mac   
OS: OS X 10.11   
See Also: https://bugs.webkit.org/show_bug.cgi?id=120786
Attachments:
Description Flags
Quick port of Blink patch (not for landing; not vetted)
none
Quick port of Blink patch v2 (not for landing; not vetted)
buildbot: commit-queue-
Archive of layout-test-results from ews100 for mac-yosemite
none
Archive of layout-test-results from ews123 for ios-simulator-wk2
none
Archive of layout-test-results from ews112 for mac-yosemite none

Description Becky Conning 2016-04-25 00:14:36 PDT
Steps:
1. Access http://jsfiddle.net/cuiffo/czmohkvo/2/
2. Move mouse over the black box
3. Click the black box
4. Move the mouse after waiting
5. Expect no "Mouse leave fired on inner" messages to be presented.

Actual results:
On Safari "Mouse leave fired on inner" appears because mouseleave is fired.

Expected results:
On Firefox, Chrome, Opera and Internet Explorer it does not.

Build Date & Platform:
Version 9.1.1 (11601.6.15, 11602.1.27)

See https://bugs.chromium.org/p/chromium/issues/detail?id=515921 for the corresponding WebKit bug that was fixed late last year.
Comment 1 Becky Conning 2016-04-25 01:24:00 PDT
Correction:

See https://bugs.chromium.org/p/chromium/issues/detail?id=515921 for the corresponding Chromium bug that was fixed late last year.
Comment 2 Radar WebKit Bug Importer 2016-04-25 07:23:00 PDT
<rdar://problem/25906098>
Comment 3 David Kilzer (:ddkilzer) 2016-04-25 12:05:10 PDT
(In reply to comment #1)
> Correction:
> 
> See https://bugs.chromium.org/p/chromium/issues/detail?id=515921 for the
> corresponding Chromium bug that was fixed late last year.

Blink commit where this is fixed:

<https://src.chromium.org/viewvc/blink?view=revision&revision=200656>
Comment 4 David Kilzer (:ddkilzer) 2016-04-25 12:06:44 PDT
(In reply to comment #3)
> (In reply to comment #1)
> > Correction:
> > 
> > See https://bugs.chromium.org/p/chromium/issues/detail?id=515921 for the
> > corresponding Chromium bug that was fixed late last year.
> 
> Blink commit where this is fixed:
> 
> <https://src.chromium.org/viewvc/blink?view=revision&revision=200656>

And the upstream commit log:

'''
Skipping mouseenter/over/out/leave on deleted nodes.

Both IE and FF skip firing of mouse transition events at deleted nodes,
with only IE doing it in a perfect manner by maintining the pairing of
entry/exit events. A crack in our code had been causing firing of these
events at a node after the node got deleted. This CL fixes the bug by
making chromium behave similar to FF. The perfect solution seems
non-trivial.

BUG=515921

Review URL: https://codereview.chromium.org/1288483003
'''
Comment 5 David Kilzer (:ddkilzer) 2016-04-26 10:35:48 PDT
Created attachment 277398 [details]
Quick port of Blink patch (not for landing; not vetted)
Comment 6 David Kilzer (:ddkilzer) 2016-04-26 14:45:08 PDT
Created attachment 277408 [details]
Quick port of Blink patch v2 (not for landing; not vetted)
Comment 7 Build Bot 2016-04-26 15:29:38 PDT
Comment on attachment 277408 [details]
Quick port of Blink patch v2 (not for landing; not vetted)

Attachment 277408 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1225459

New failing tests:
fast/events/mouse-events-on-node-deletion.html
Comment 8 Build Bot 2016-04-26 15:29:43 PDT
Created attachment 277412 [details]
Archive of layout-test-results from ews100 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 9 Build Bot 2016-04-26 15:37:51 PDT
Comment on attachment 277408 [details]
Quick port of Blink patch v2 (not for landing; not vetted)

Attachment 277408 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1225460

New failing tests:
fast/events/mouse-events-on-node-deletion.html
Comment 10 Build Bot 2016-04-26 15:37:55 PDT
Created attachment 277414 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 11 Build Bot 2016-04-26 15:57:00 PDT
Comment on attachment 277408 [details]
Quick port of Blink patch v2 (not for landing; not vetted)

Attachment 277408 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1225521

New failing tests:
fast/events/mouse-events-on-node-deletion.html
Comment 12 Build Bot 2016-04-26 15:57:04 PDT
Created attachment 277417 [details]
Archive of layout-test-results from ews112 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 13 Lucas Forschler 2019-02-06 09:19:14 PST
Mass move bugs into the DOM component.
Comment 14 Ryosuke Niwa 2019-02-06 21:05:32 PST
*** Bug 186094 has been marked as a duplicate of this bug. ***
Comment 15 Ahmad Saleem 2023-11-02 02:24:44 PDT
I am able to reproduce this bug on Safari Technology Preview 182 as well. Firefox Nightly 121 and Chrome Canary 121 match other and don't fire event after mouse leave container in test case (post clicking - delete).