Tooltip display hard coded to 5seconds

RESOLVED DUPLICATE of bug 395668

Status

()

--
trivial
RESOLVED DUPLICATE of bug 395668
10 years ago
10 years ago

People

(Reporter: glen.a.ritchie, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

The tool tip time-out used for displaying of html elements with "title" attribute tags is currently hard coded to 5 seconds. For some tool tips with very large content, 5 seconds is insufficient time to read the text. The value is not end user configurable through about:config

Other users with same problem: http://support.mozilla.com/tiki-view_forum_thread.php?forumId=1&comments_parentId=91671




Reproducible: Always

Steps to Reproduce:
1. Navigate or create a html with a html tag(eg, <a>) that has a very long title attribute(Google personalised homepage with RSS views have this )
2. Hover the mouse over the html element
3. Tool tip will appear
3. Tool tip will disappear in 5seconds
Actual Results:  
The tool tip will disappear in 5seconds

Expected Results:  
The tool tip should disappear in a user configurable amount of time ( or perhaps even based on how long the text is? )

I believe this is caused by the value here:
http://mxr.mozilla.org/firefox/source/layout/xul/base/src/nsXULTooltipListener.h#156

155   enum {
156     kTooltipAutoHideTime = 5000,       // 5000ms = 5 seconds
157     kTooltipShowTime = 500             // 500ms = 0.5 seconds
158   };

Which is then used here http://mxr.mozilla.org/firefox/source/layout/xul/base/src/nsXULTooltipListener.cpp#738 :
738   if ( mAutoHideTimer )
739     mAutoHideTimer->InitWithFuncCallback(sAutoHideCallback, this, kTooltipAutoHideTime, 
740                                          nsITimer::TYPE_ONE_SHOT);

I believe this could be an appropriate fix:
738   if ( mAutoHideTimer )
739     mAutoHideTimer->InitWithFuncCallback(sAutoHideCallback, this, nsContentUtils::GetIntPref("browser.chrome.toolbar_tips_timeout", kTooltipAutoHideTime), 
740                                          nsITimer::TYPE_ONE_SHOT);

Alternatively, you could retrieve the time-out value in a windowing system specific way.
Win32: http://msdn.microsoft.com/en-us/library/bb760250.aspx and http://msdn.microsoft.com/en-us/library/bb760404(VS.85).aspx
Gnome: http://library.gnome.org/devel/gtk/2.12/GtkSettings.html#GtkSettings--gtk-tooltip-browse-timeout

Comment 1

10 years ago
DUPE of bug 395668
This is indeed a duplicate of bug 395668. Reporter, maybe you want comment and attach your patch in bug 395668? Patches are always welcome.

Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 395668
You need to log in before you can comment on or make changes to this bug.