Closed Bug 752336 Opened 8 years ago Closed 8 years ago

Location Bar doesn't revert back to the correct url when you enter text then shift-middle click GO to open in a new tab.

Categories

(SeaMonkey :: Location Bar, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: philip.chee, Assigned: philip.chee)

References

Details

Attachments

(1 file, 1 obsolete file)

From Bug 708640:

> Relevant Firefox bugs:
.......
>   [Bug 405541] Location Bar don't revert back to the correct url of the tab
> when you middle click go after entering text, to open in a new tab.
Somehow I missed this last part.
Attached patch Patch v1.0 Proposed fix. (obsolete) — Splinter Review
>        if (GetBoolPref("browser.tabs.opentabfor.urlbar", false)) {
> +        // Reset url in the urlbar
> +        URLBarSetURI();
One line fix.

> -  if (!gURLBar.readOnly) {
IIRC we originally added this solely for Firefox compatibility, but in the meantime Firefox has removed the check for .readOnly and as far as I can see nothing in the tree these days sets the property to true.

> -    if (gURLBar.value)
> -      gURLBar.select();
> -    else
> -      gURLBar.focus();
> -  }
> +  if (gURLBar.value)
> +    gURLBar.select();
> +  else
> +    gURLBar.focus();
Attachment #621431 - Flags: review?(neil)
(In reply to Philip Chee from comment #1)
> >        if (GetBoolPref("browser.tabs.opentabfor.urlbar", false)) {
> > +        // Reset url in the urlbar
> > +        URLBarSetURI();
> One line fix.
Does this mean we can get rid of the userTypedValue line below?
> Does this mean we can get rid of the userTypedValue line below?
Yes it does. Removed.
Attachment #621431 - Attachment is obsolete: true
Attachment #621431 - Flags: review?(neil)
Attachment #621497 - Flags: review?(neil)
Comment on attachment 621497 [details] [diff] [review]
Patch v1.1 fix nit.

(I think the userTypedValue fixed the foreground tab case only.)
Attachment #621497 - Flags: review?(neil) → review+
Pushed to comm-central
http://hg.mozilla.org/comm-central/rev/d02aaba934c0
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.