Closed Bug 148624 (tooltip-ghost) Opened 22 years ago Closed 8 months ago

Tooltips persist in foreground when Firefox is in background

Categories

(Core :: XUL, defect)

defect

Tracking

()

VERIFIED FIXED
119 Branch
Tracking Status
firefox119 --- verified

People

(Reporter: Juneappal, Assigned: fanzhuyifan+github)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(8 files)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.0+)
Gecko/20020602
BuildID:    2002060203

If I mouseover a toolbar link, and wait for a second, a little yellow box with
the description of the link appears.  If I now use command-tab to move Mozilla
to the background, the little yellow box stays there, in the foreground.  The
only way to get rid of it is to put mozilla in the foreground again, and move
the mouse off the toolbar.

Reproducible: Always
Steps to Reproduce:
1.Mouseover a toolbar icon
2.Wait for tooltip
3.Command-tab

Actual Results:  The tooltip wouldn't go away

Expected Results:  The tooltip should have gone away when mozilla was backgrounded

This is related to the following bugs.  I am resubmitting because the other
reporters did not give good step by step reproduction methods, or the problem is
slightly different:

<http://bugzilla.mozilla.org/show_bug.cgi?id=131131>Tooltips show up over other
windows 

*
<http://bugzilla.mozilla.org/show_bug.cgi?id=142656>
Tooltips occasionally don't disappear

*
<http://bugzilla.mozilla.org/show_bug.cgi?id=61157> 
Tooltips appear even when mouse isn't over node

*
<http://bugzilla.mozilla.org/show_bug.cgi?id=116447> 
tooltip persists after autocomplete dropdown appears

*
<http://bugzilla.mozilla.org/show_bug.cgi?id=45497> Tooltip should disappear
when parent item disappears
Confirmed using FizzillaCFM/2002052305 (RC3).

Guessing XP Toolkit/Widgets.
Assignee: Matti → jaggernaut
Status: UNCONFIRMED → NEW
Component: Browser-General → XP Toolkit/Widgets
Ever confirmed: true
QA Contact: imajes-qa → jrgm
See this on WinXP as well. --> OS/All & Platform All
OS: MacOS X → All
Hardware: Macintosh → All
This doesn't requires an ALT-TAB. I can reproduce this by dragging a link from
the URL bar onto my desktop, by dragging a link up to the "X" in the upper
right corner and letting go and clicking the X. Lots of ways.
I'm seeing this problem in 1.6 on Win98.
*** Bug 242912 has been marked as a duplicate of this bug. ***
Also happens in Firefox/0.8, Linux GTK2, although in this case the offending
tooltips can be killed by moving the mouse pointer over them. Still very
annoying though.
Should be marked as a duplicate of Bug 142656.
*** Bug 262649 has been marked as a duplicate of this bug. ***
*** Bug 295742 has been marked as a duplicate of this bug. ***
Just a ping and a note that this is still occuring in the latest builds of
Firefox and Thunderbird.
Not only do tooltips persist in the foreground, but they can pop up even when
Firefox is in the background and the mouse passes over a point that would
generate a tooltip if Firefox was in the foreground.
This behaves as though Firefox/Thunderbird are unaware that the mouse pointer
has exited their window and is not in another window. Somehow they continue to
receive coordinates even though there is another window over them. One nasty
example fo this bug is to load a PDF file and then drag the mouse from the URL
bar, across the personal toolbar, and into the PDF content. A tooltip from the
personal toolbar will pop up over the PDF and will never go away until you
mouseover it.
Make that, "and is now in another window"
*** Bug 335527 has been marked as a duplicate of this bug. ***
*** Bug 323120 has been marked as a duplicate of this bug. ***
*** Bug 342427 has been marked as a duplicate of this bug. ***
Blocks: 334351
How about disabling tooltips when the Firefox window is inactive?
This is really annoying. I'm on OSX, using Sunbird, and these tooltips keep appearing which I can't get rid of despite having only flicked quickly to Sunbird to check my calendar. It makes me quit sunbird, that's the easiest way to get rid of the things!
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.8pre) Gecko/20071002 Sunbird/0.7

I don't have sunbird, BUT I agree with you Dan!
ON a Mac and it still happens in Firefox 2.0.0.14 

I've been I've been bitchin about this bug since 2004 (see bug: 236870) -- Which is obviously a dupe of this bug...  But it never seems to go away! -- 

Bug still appears on Mac in:
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.14)
Gecko/20080404 Firefox/2.0.0.14

But it's a bit harder to replicate.

To replicate in 2.0.0.14:
1: Mouse over something that generates a tip.
2: Hit "Command" (Apple) -- TIP DISAPPEARS (yay!)
3: (still holding Command) Slightly move mouse -- TIP REAPPEARS (Oh-Oh)
4: Hit "TAB" to complete the switch to another app -- TIP REMAINS (#*$%!)

Tip remains until you switch back to Firefox... This sounds minor.. But it's
very frequent for users of track pads that do a lot of switching! -- Others in
our office have tihs problem!

BUT there may be hope on the horizon.. I've had trouble replicating this in
Firefox 3 RC 2, the tip stays when you switch, but as soon as you move the
mouse, it disappears (keyboard events don't clear the tip unfortunately).

Cheers,
Nik.
Still happening, exactly the same, on Sunbird 0.8 :(((

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.13pre) Gecko/20080331 Sunbird/0.8


I saw this with Lightning 0.9 build 2008091719 in Thunderbird 2.0.0.17 (20080914), all pt-BR, over Win2k SP4 en-US.
I opened a task for edition and moved the mouse to the reminder window. In its way, the mouse crossed the tasks pane and a tooltip came (too quick, IMHO). Even after clicking in the reminder window (to get focus), the tip stayed on top of it. I had to play with the mouse a bit to get rid of the tip (can't remember if I just moved it around or clicked somewhere else).
Assignee: jag → nobody
I'm not seeing this in fx 3.6.11 (and I didn't see it with 3.6.8, fwiw) on Mac OS X.

Specifically, the STR in commment #21.

Neil, could you have fixed this along the way somewhere?
fwiw, on mac, fx 3.5, 3.0.19 and even 3.0 do not have this bug, but fx 2.0.0.20 does.

I wonder if this was fixed by neil's work for #279703 (or one of the dependent bugs)?
I see this in 3.6.12 (on 10.5.xx and 10.6.5) and a 2010-12-03 nightly on 10.6.5.

It's been driving me nuts for years. Most definitely not fixed.

Here's an observation which might explain "worksforme" responses.

If Fx is the frontmost app, the Cmd key that I use to initiate Cmd-Tab will cause the tooltip to disappear.

If Fx is *not* the frontmost app, it still responds to hovers and throws up a tooltip... but the frontmost app takes keyboard input, so Fx isn't aware of any app or window changes. It's thus possible to Cmd-Tab to an app that should cover the tooltip, but the tooltip stays on top.

Easy enough to repro: give focus to the Finder, hover over a tab or link in Firefox without shifting focus, then Cmd-Tab to an app that would be over the link when taking focus (such as a maximized iTunes window).

Tiny screenshot attached.
Richard:  killing this bug would be great.

What about not showing tooltips (when that timer fires) if the window doesn't have focus?

in nsXULTooltipListener::ShowTooltip() we call LaunchTooltip()

In ShowTooltip() we already get the document for the tooltip node

From that, can we get the nsPIDOMWindow and then ask the focus manager if we are the focusedWindow?

http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/base/nsIFocusManager.idl#71

Similar to this code:

http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/html/nsHTMLEditor.cpp#5963
(In reply to comment #28)
> Richard:  killing this bug would be great.
> 
> What about not showing tooltips (when that timer fires) if the window doesn't
> have focus?

That seems like a reasonable approach. Safari (to take a sample of the playing field) doesn't show tooltips if it's not the foreground app.

If no XULian takes a stab at this, I might be tempted — at least, after my urgent Sync commitments are done… it's a real annoyance to me.
bookmarks on the bookmarks toolbar in 3.6.12 will not change style or give me a tooltip on hover if firefox is not active.  (Richard, can you double check 3.6.12?)

But I can confirm that firefox 4.0b7 does do it.

another sample from the playing field:  Google Chrome (on Mac) doesn't seem to show tooltips it's not the foreground app, either.

From my tests:

1)  firefox 4.0b7 has a different regression (what Richard describes in comment #27)
2)  neither fx 3.6.12 nor 4.0b7 have the bug described comment #21, which is why I thought this bug is now fixed/worksforme.  Unfortunately, I don't know what fixed it.
(In reply to comment #30)
> bookmarks on the bookmarks toolbar in 3.6.12 will not change style or give me a
> tooltip on hover if firefox is not active.  (Richard, can you double check
> 3.6.12?)

I see the same behavior as you for that case for a fresh 3.6.12 profile.

However, I did get two other repro cases:

* Hold Cmd.
* Hover over a bookmark on the bookmark bar. Tooltip appears.
* Hit Tab to switch to Finder. Tooltip remains active.

Mouse position might be important here -- in some cases the tooltip disappears if you move the mouse and Firefox is still under the cursor.

... and a really awesome different version of this bug:

* Start a drag for a long-titled bookmark in the bookmark bar. Don't move off the bookmark.
* Hit Cmd-Tab to switch to Finder.
* Hit Esc to cancel the drag.
* Release the mouse button. Finder will have focus, but the tooltip will appear from hovering over the bookmark.

Again, mouse position is important.

I haven't tested either of these two cases in Fx4. It certainly seems like someone with a good understanding of the various window events on the Mac needs to audit all this...
This bug still persists in Firefox 5.0.1.

Not only do tooltips that were already displayed remain visible when you switch from Firefox to another app, they appear if the mouse strays into that region while Firefox is already in the background.
(In reply to comment #32)
> 
> Not only do tooltips that were already displayed remain visible when you
> switch from Firefox to another app, they appear if the mouse strays into
> that region while Firefox is already in the background.

Yes -- this is actually the far, *far* more irritating symptom (at least on Mac OS X), if anyone is keeping track.
This screenshot shows Transmission in the foreground and Firefox 5.0.1 in the background. Moving the pointer around the Transmission Inspector window causes Firefox's tooltips to be triggered, such as Adblock Plus' very large tooltip, which appears via the Adblock Plus toolbar button.
This screenshot shows Transmission in the foreground and Firefox 5.0.1 in the background. Moving the pointer around the Transmission Inspector window causes Firefox's tooltips to be triggered. In this example, with the mouse pointer positioned over Transmission's "Options" ("gear") button, both Transmission's "Options" tooltip and Firefox's Google search box tooltip are presented at the same time, with one layered over the other.

It's _really_ annoying.
BTW, this is not just to do with tooltips, although that is the most intrusive and noticeable aspect; with Firefox 5.0.1 in the background and Transmission in the foreground, as you can see from this screenshot the tooltip for a bookmark is triggered. However, you'll also note that the item's "mouse over" state has been triggered. When moving the pointer into the vicinity of the bookmark, the bookmark button's state changes first, and a moment later the URL tooltip appears.

Most other (real) buttons do not appear to be affected by this "mouse over" state change, just their tooltips appear. An exception to this is the "Open a New Tab" "+" button; when Firefox is in the background, the "+" button's "mouse over" state is triggered (and naturally its tooltip) when the mouse pointer goes into that region of the backgrounded Firefox window.
Firefox tooltips always on top of all windows and not going away until you restart Firefox  still happens in Firefox v.36.0
This is still happening in 49.0.2 on Windows 10

if you drag a link with a tooltip, after you drop the link elsewhere, the tooltip appears and remains as a top level item on the desktop until you focus and then unfocus Firefox
Severity: normal → S3

The severity field for this bug is relatively low, S3. However, the bug has 8 duplicates and 15 votes.
:enndeakin, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(enndeakin)

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

Flags: needinfo?(enndeakin)

Still reproducible (and still extremely annoying) with Thunderbird 102.4.1 (64-bit) and Firefox 106.0.1 (64-bit) on GNU/Linux. When I'm multitasking, I need to manually minimize Thunderbird in order to prevent its tooltips from interfering from my work in other windows.

Not reproducible with SeaMonkey 2.53.14, so maybe this isn't a Core product issue after all, or maybe SeaMonkey has done something to override the bad behaviour. Maybe the Firefox and Thunderbird developers can see what SeaMonkey has done to fix the issue and implement the same fix.

This 21 year old bug is still open. It is quite annoying, to be frank -- happens to me at least once per day.

That said, given its longevity, I'm kinda partial to let it be forever. It feels like a relic from the past.

Hi, still happening to me too (OS: KDE Neon 22.04).
Firefox v113.0.2

Still happening on Firefox 115.0.2 + GNOME 44.

I just browser-hopped back to firefox this week and this was one of the larger annoyances, as I trigger it constantly.

For people who find this page via search engine, like me, the solution I'm using is to disable tooltips entirely, with the setting browser.chrome.toolbar_tips. It's a weird thing to have to resort to, but I don't think there's really any situation where I'll miss them.

I am also experiencing this bug.

Version: firefox 117.0, clean profile; also thunderbird 115.2.0. Using xfce with xfwm.

Steps to reproduce:

Hover mouse over element that will generate tooltip.
Just as the tooltip is a about to appear, but before the tooltip appears, use hotkey to switch to another workspace.

Symptoms:
The tooltip will appear in the other workspace, and will not disappear until I switch back to firefox and move my mouse.

Assignee: nobody → fanzhuyifan+github
Status: NEW → ASSIGNED

(In reply to fanzhuyifan+github from comment #45)

I am also experiencing this bug.

Version: firefox 117.0, clean profile; also thunderbird 115.2.0. Using xfce with xfwm.

Steps to reproduce:

Hover mouse over element that will generate tooltip.
Just as the tooltip is a about to appear, but before the tooltip appears, use hotkey to switch to another workspace.

Symptoms:
The tooltip will appear in the other workspace, and will not disappear until I switch back to firefox and move my mouse.

Reproducing the bug on firefox-nightly, on linux, xorg, xfce with xfwm.

Updated Steps to reproduce:

  • Hover mouse over browser element that will generate tooltip (e.g., task bar. not webpage elements with tooltips)
  • alt-tab to another window or use quick key to switch to another workspace

I think a better fix would be for widget to send a window-level mouse exit event when the workspace switch happens. But I'm not sure where that code would go or how we would detect this situation.

The nodes are already getting focusout events when workspace switches. This means some part of the code must already be detecting this situation, right?

Duplicate of this bug: 687344
Attachment #9351511 - Attachment description: Bug 148624 - cancel tooltip timer on focusout. r=mstange,cmartin → Bug 148624 - only show tooltip when document has focus. r=mstange,cmartin
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8ae372dc88d1
only show tooltip when document has focus. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
See Also: → 1852191
Blocks: 1852653
Flags: qe-verify+
Regressions: 1857513

For me the bug only shows up when MOZ_ENV_XINPUT2 is set to 1. The bug disappears as soon as MOZ_ENV_XINPUT2 is set to 0.

Summary: Tooltips persist in foreground when Mozilla is in background → Tooltips persist in foreground when Firefox is in background

(In reply to fanzhuyifan+github from comment #53)

For me the bug only shows up when MOZ_ENV_XINPUT2 is set to 1. The bug disappears as soon as MOZ_ENV_XINPUT2 is set to 0.

That's bug 1809029. I can't repro but fixes are welcome.

Duplicate of this bug: 1809029
See Also: → 1849829
Duplicate of this bug: 1853543
Alias: tooltip-ghost
Duplicate of this bug: 1859519

I've reproduced this issue using Firefox 106.0.1 on Ubuntu 22.04 following the STR from Comment 0.
Verified as fixed on the latest Nightly 120.0a1 version under same configuration where the issue no longer persists.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Regressions: 1861427

Ryan, what do you think about uplifting to 115 ?
I've been running a local Thunderbird 115 with this patch applied, and it's been working fine for me, and the bug is fixed.

Flags: needinfo?(ryanvm)

I don't think this is a good uplift candidate, no.

Flags: needinfo?(ryanvm)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: