popup tooltip of html element appear even when window is out of focus
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox119 | --- | fixed |
People
(Reporter: fanzhuyifan+github, Assigned: fanzhuyifan+github)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0
Steps to reproduce:
Environment: firefox nightly on linux with X11, on xfce with xfwm
- hover the mouse on top of a html element that will show a tooltip (e.g., see attached html)
- before the tooltip appears, alt-tab to switch window, or use hot key to change to another workspace
Actual results:
The tooltip appears (possibly above other windows or in another workspace), even though firefox is not in focus.
Expected results:
The tooltip shouldn't have appeared, or should have stayed with the corresponding firefox window.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
This is different from 148624 in that 148624 was related to XUL components, while this is related to HTML elements on web pages displaying in firefox.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
(In reply to fanzhuyifan+github from comment #1)
This is different from 148624 in that 148624 was related to XUL components, while this is related to HTML elements on web pages displaying in firefox.
What I previously said is incorrect. By adding print statements, I can confirm that the relevant code is also the ShowTooltip()
function from layout/xul/nsXULTooltipListener.cpp
. So this is related to 148624.
In addition, I confirmed on my computer that this is not a regression caused by https://phabricator.services.mozilla.com/D187418
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 3•1 year ago
|
||
Further debugging shows that ShowTooltip()
is called and correctly exists from the fix https://phabricator.services.mozilla.com/D187418
However, for some reason the tooltip still shows up.
Assignee | ||
Comment 4•1 year ago
|
||
I added more print statements and here is the call graph I think is causing the graph:
- In
docshell/base/nsDocShellTreeOwner.cpp
,sTooltipCallback
is fired - This calls
ShowTooltip
in the same file - This calls
OnShowTooltip
fromdom/ipc/BrowserChild.cpp
- This calls
SendShowTooltip
- So
RecvShowTooltip
fromdom/ipc/BrowserParent.cpp
is called - This calls
XULBrowserWindow.showTooltip
frombrowser/base/content/browser.js
None of these steps checks if the relevant firefox window has lost focus. Hence, the tooltip is erroneously displayed.
To fix the issue, where do you think we should insert code to check if the current window is active?
Assignee | ||
Comment 5•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 7•1 year ago
|
||
bugherder |
Description
•