Last Comment Bug 752336 - 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.
: Location Bar doesn't revert back to the correct url when you enter text then ...
Status: RESOLVED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: Location Bar (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Philip Chee
:
:
Mentors:
Depends on: 708640
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-06 10:19 PDT by Philip Chee
Modified: 2012-05-07 11:11 PDT (History)
0 users
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch v1.0 Proposed fix. (2.03 KB, patch)
2012-05-06 10:27 PDT, Philip Chee
no flags Details | Diff | Splinter Review
Patch v1.1 fix nit. (2.37 KB, patch)
2012-05-06 20:59 PDT, Philip Chee
neil: review+
Details | Diff | Splinter Review

Description Philip Chee 2012-05-06 10:19:59 PDT
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.
Comment 1 Philip Chee 2012-05-06 10:27:05 PDT
Created attachment 621431 [details] [diff] [review]
Patch v1.0 Proposed fix.

>        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();
Comment 2 neil@parkwaycc.co.uk 2012-05-06 16:12:12 PDT
(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?
Comment 3 Philip Chee 2012-05-06 20:59:51 PDT
Created attachment 621497 [details] [diff] [review]
Patch v1.1 fix nit.

> Does this mean we can get rid of the userTypedValue line below?
Yes it does. Removed.
Comment 4 neil@parkwaycc.co.uk 2012-05-07 04:50:08 PDT
Comment on attachment 621497 [details] [diff] [review]
Patch v1.1 fix nit.

(I think the userTypedValue fixed the foreground tab case only.)
Comment 5 Philip Chee 2012-05-07 11:11:28 PDT
Pushed to comm-central
http://hg.mozilla.org/comm-central/rev/d02aaba934c0

Note You need to log in before you can comment on or make changes to this bug.