Closed Bug 480443 Opened 12 years ago Closed 11 years ago

URLbar should only show address tooltip when overflowing

Categories

(Firefox :: Address Bar, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
Firefox 3.7a1

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

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

Attachments

(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
Status: UNCONFIRMED → NEW
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]
patch

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
Status: NEW → ASSIGNED
Attachment #364810 - Flags: review?(dietrich)
Attachment #364810 - Flags: review?(dietrich) → review?(gavin.sharp)
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 https://developer.mozilla.org/En/XUL:Events .
Attachment #364810 - Flags: review?(gavin.sharp) → 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?(gavin.sharp)
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?(gavin.sharp) → review+
Thanks for the patch, Geoff, and sorry the review took so long :(
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/e3cbcefd4e44
Status: ASSIGNED → RESOLVED
Closed: 11 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.