Additional mouseenter are fired while holding left button then switch tabs using keyboard
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P2)
Tracking
()
People
(Reporter: edgar, Assigned: edgar)
Details
Attachments
(1 file)
STR
- Open multiple tabs.
- Load https://codepen.io/edgarchen-the-decoder/pen/ExVONrm in one of the tabs.
- Move the mouse to the green area.
- Click and hold mouse left button.
- Switch to another tab via keyboard shortcut (
control+tabin MAC for example) - Release the mouse button.
- Switch back to the condepen tab via clicking in tab bar.
Expected result:
Only mouseenter and mouseleave are logged in the green area.
The mouseenter is from step 3.
The mouseleave is fired because of switching to another tab in step 5.
Actual results:
Additional mouseenter is fired. And another mouseleave is fired while mousing over the web content.
| Assignee | ||
Comment 1•6 years ago
|
||
It doesn't look like a recent regression, given that I could reproduce this bug in 76 for example.
| Assignee | ||
Comment 2•6 years ago
|
||
While the mouse moves from the old tab to the new tab, we should dispatch a eMouseExitFromWidget to the old tab and a eMouseEnterIntoWidget to the new tab, but the eMouseEnterIntoWidget is somehow dispatched to old tab instead.
I suspect it is because we track the mouse down for dragging gesture in https://searchfox.org/mozilla-central/rev/9193635dca8cfdcb68f114306194ffc860456044/dom/events/EventStateManager.cpp#1674, and use it as mCurrentTarget in https://searchfox.org/mozilla-central/rev/9193635dca8cfdcb68f114306194ffc860456044/dom/events/EventStateManager.cpp#1827.
| Assignee | ||
Comment 3•6 years ago
|
||
We probably need to overwrite mCurrentTarget for eMouseEnterIntoWidget like what we do for eMouseExitFromWidget in https://searchfox.org/mozilla-central/rev/9193635dca8cfdcb68f114306194ffc860456044/dom/events/EventStateManager.cpp#4218-4222.
| Assignee | ||
Comment 4•6 years ago
|
||
| Assignee | ||
Comment 5•6 years ago
|
||
| Assignee | ||
Comment 6•6 years ago
|
||
Updated•6 years ago
|
| Assignee | ||
Comment 7•6 years ago
|
||
(In reply to Edgar Chen [:edgar] from comment #6)
https://treeherder.mozilla.org/#/jobs?repo=try&revision=58b4fa2f859ff193d3f6b217075dd435b0d85970
There is an intermittent failure on test verification on opt build.
| Assignee | ||
Comment 8•6 years ago
|
||
| Assignee | ||
Comment 9•6 years ago
|
||
I think the test is stable enough now.
Updated•6 years ago
|
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
| bugherder | ||
Updated•6 years ago
|
Comment 12•6 years ago
|
||
I managed to reproduce the issue using an older version of Nightly (2020-05-19). I retested everything on macOS 10.13, Windows 10 x64 and Ubuntu 18.04x64 using the latest Nightly 80.a1 and Firefox 79.0b3. The issue is not reproducing anymore.
Description
•