Closed
Bug 1466009
Opened 6 years ago
Closed 4 years ago
Changing tab with left button pressed sticks cursor icon
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P2)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: mark, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 Build ID: 20180516032328 Steps to reproduce: 1) On windows, press and hold the left button over a link. The cursor should be the hand-pointer icon due to being over a link. 2) Without releasing left button, change the active tab using Ctrl+1 or similar. This might seem a little contrived, but it is an issue for gestures extensions that support Chord gestures such as Foxy Gestures. Changing the active tab using tabs.update() has the same sticky cursor icon issue. Actual results: The cursor is stuck in the hand-pointer icon in the newly activated tab. Expected results: Cursor icon should be reset to whatever the proper icon is for the newly activated tab.
Comment 1•6 years ago
|
||
Hi, I've managed to reproduce the issue above using the latest Nightly 62.0a1 Build ID:20180605220158 on Win10 x64. Please also see Bug 252249, maybe it's a duplicate of it.
Status: UNCONFIRMED → NEW
status-firefox60:
--- → affected
status-firefox61:
--- → affected
status-firefox62:
--- → affected
Component: Untriaged → Event Handling
Ever confirmed: true
OS: Unspecified → Windows 10
Product: Firefox → Core
Hardware: Unspecified → x86
See Also: → 252249
Version: 60 Branch → Trunk
Comment 2•6 years ago
|
||
Gijs, sorry to bug you, but do you know what code controls the cursor type?
Flags: needinfo?(gijskruitbosch+bugs)
Comment 3•6 years ago
|
||
(In reply to Andrew Overholt [:overholt] from comment #2) > Gijs, sorry to bug you, but do you know what code controls the cursor type? AFAICT from a quick check, I see two avenues: pointer lock code goes through the DOM event state manager and calls SetCursor on the widget layer, which for e10s forwards through TabParent/TabChild IPC messages to the toplevel widget, if need be. The second avenue is that layout propagates cursor styles from individual frames. Looking for blame at https://searchfox.org/mozilla-central/rev/6f86cc3479f80ace97f62634e2c82a483d1ede40/layout/generic/nsFrame.cpp#5201 , maybe :xidorn or :masayuki can help. In principle, I would expect the layout/dom code to get enough information here to be able to send a cursor update to Windows, but I'm probably missing something.
Flags: needinfo?(xidorn+moz)
Flags: needinfo?(masayuki)
Flags: needinfo?(gijskruitbosch+bugs)
I'm not so familiar with pointing device event handling though, looks like that it's related to capture of mouse events. Perhaps, somebody started to capture mouse events at mouse down, then, tab switching didn't cause releasing the capture, so, perhaps, PresShell do something in mouse capture mode. I don't know why after a mousemove, I cannot switch active tab with keyboard. But perhaps, before the first mousemove, keyboard operation should not cause switching tabs.
Flags: needinfo?(masayuki)
Comment 5•6 years ago
|
||
I'm not familiar with event dispatching. Experimenting a bit, it seems to be an e10s-specific issue, while it's unrelated to platform. I think the reason is that, eMouseEnterIntoWidget is sent to the wrong TabParent somehow. I put printf into TabParent::SendRealMouseEvent[1] and found that when button is pressed, both eMouseExitFromWidget and eMouseEnterIntoWidget would be dispatched to the previous TabParent, and thus the new tab doesn't have mTabSetsCursor and consequently cannot update cursor. I guess eMouseEnterIntoWidget is generated in EventStateManager::DispatchMouseOrPointerEvent[2] so it feels like that the MouseOver event is being dispatched to a wrong element. Someone familiar with mouse event dispatching should probably continue from here and see why MouseOver is dispatched to a wrong element in that case. [1] https://searchfox.org/mozilla-central/rev/6f86cc3479f80ace97f62634e2c82a483d1ede40/dom/ipc/TabParent.cpp#1100-1110 [2] https://searchfox.org/mozilla-central/rev/6f86cc3479f80ace97f62634e2c82a483d1ede40/dom/events/EventStateManager.cpp#4271-4291
Flags: needinfo?(xidorn+moz)
Updated•6 years ago
|
OS: Windows 10 → All
Hardware: x86 → All
Comment 6•6 years ago
|
||
OK, let's wait until Olli is back. Thank you all for looking into this!
Flags: needinfo?(bugs)
Priority: -- → P2
Assignee | ||
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
Comment 7•4 years ago
|
||
Hi mark, recently there are some improvements for mouse cursor updating, are you still seeing this on recent Nightly?
Flags: needinfo?(mark)
Comment 8•4 years ago
|
||
(In reply to Edgar Chen [:edgar] from comment #7)
Hi mark, recently there are some improvements for mouse cursor updating, are you still seeing this on recent Nightly?
FWIW, I don't see this issue on nightly 80.
I tested both 78 and 80 and am no longer able to reproduce the issue.
Flags: needinfo?(mark)
Comment 10•4 years ago
|
||
Thanks for verifying, close as WORKSFORME.
Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(bugs)
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•