Closed Bug 480443 Opened 14 years ago Closed 13 years ago

URLbar should only show address tooltip when overflowing


(Firefox :: Address Bar, defect)

Not set



Firefox 3.7a1


(Reporter: darktrojan, Assigned: darktrojan)



(Keywords: polish, Whiteboard: [polish-easy][polish-interactive][polish-p2])


(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2

The tooltip for the location bar is displayed even when the location is clearly visible. It should only show when the location overflows. As far as I can tell, this is the way Firefox used to behave.

Reproducible: Always

Steps to Reproduce:
1. Visit a website with a short address
2. Hover over the location bar
Actual Results:  
Tooltip shows, with the same text as shown in the location bar

Expected Results:  
Tooltip doesn't show, unless address is too long to be displayed
Attached patch patch (obsolete) — Splinter Review
This is my first ever patch! Please be gentle. :)
Attachment #364418 - Flags: review?(dietrich)
Severity: normal → minor
Ever confirmed: true
OS: Windows Vista → All
Hardware: x86 → All
Version: unspecified → Trunk
Whiteboard: [polish-easy][polish-interactive]
Keywords: polish
Comment on attachment 364418 [details] [diff] [review]

I didn't know these events work for input fields... nice!

>+            case "overflow":
>+              this._contentIsCropped = true;
>+              break;
>+            case "underflow":
>+              this._contentIsCropped = false;
>+              break;

You need to call this._hideURLTooltip(); in the underflow case, or check self._contentIsCropped in the timeout callback in _initURLTooltip.
Attached patch patch v2Splinter Review
Attachment #364418 - Attachment is obsolete: true
Attachment #364418 - Flags: review?(dietrich)
assigning to you for now since you're working on this.
Assignee: nobody → geoff
Attachment #364810 - Flags: review?(dietrich)
Attachment #364810 - Flags: review?(dietrich) → review?(
Comment on attachment 364810 [details] [diff] [review]
patch v2

i don't have full browser peer status, and also haven't ever looked at this code. forwarding review request to gavin.
Comment on attachment 364810 [details] [diff] [review]
patch v2

This doesn't appear to work (I never get a tooltip with this patch applied). The overflow/underflow events aren't fired for textbox text changes, per .
Attachment #364810 - Flags: review?( → review-
Overflow/underflow events are fired by the anonymous <div> created in /layout/forms/nsTextControlFrame.cpp, or at least they are on my Windows install and my Linux install.
WFM on Linux, too.
Attachment #364810 - Flags: review- → review?
Attachment #364810 - Flags: review? → review?(
This bug's priority relative to the set of other polish bugs is:
P2 - Polish issue that is in a secondary interface, occasionally encountered, and is easily identifiable.

even though the location bar is in the main window, the tooltip should probably be considered secondary UI, and something that is only occasionally relied upon.
Whiteboard: [polish-easy][polish-interactive] → [polish-easy][polish-interactive][polish-p2]
Flags: wanted-firefox3.6?
Comment on attachment 364810 [details] [diff] [review]
patch v2

Hmm, indeed, seems to work fine - not sure what happened when I tested this the first time.
Attachment #364810 - Flags: review?( → review+
Thanks for the patch, Geoff, and sorry the review took so long :(
Keywords: checkin-needed
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a1
Depends on: 549835
Flags: wanted-firefox3.6?
You need to log in before you can comment on or make changes to this bug.