Middle/ctrl-click on the home button doesn't load tab in background when shift is pressed

ASSIGNED
Assigned to

Status

()

Firefox
General
--
minor
ASSIGNED
10 years ago
7 years ago

People

(Reporter: Klaas Heidstra, Assigned: Klaas Heidstra)

Tracking

({uiwanted})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [has patch])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1a1pre) Gecko/2008062918 Minefield/3.1a1pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1a1pre) Gecko/2008062918 Minefield/3.1a1pre

From bug 440702 comment 34 :

BrowserGoHome() has a bug when you ctrl- or middle-click click it, it doesn't
make any difference if shift is pressed or not. It should open the homepage in
background when shift is pressed (and the pref is set to default), but instead
the new tab is selected. This is because of this code:
> // openUILinkIn in utilityOverlay.js doesn't handle loading multiple pages
> switch (where) {
> case "current":
>   loadOneOrMoreURIs(homePage);
>   break;
> case "tabshifted":
> case "tab":
>   urls = homePage.split("|");
>   var loadInBackground =
>getBoolPref("browser.tabs.loadBookmarksInBackground", false);
>   gBrowser.loadTabs(urls, loadInBackground);
>   break;
> case "window":
>   OpenBrowserWindow();
>   break;
> }

This problem can be fixed by replacing the above code with this:
> // openUILinkIn in utilityOverlay.js doesn't handle loading multiple pages
> var loadInBackground = getBoolPref("browser.tabs.loadBookmarksInBackground",
>false);
> switch (where) {
> case "current":
>   loadOneOrMoreURIs(homePage);
>   break;
> case "tabshifted":
>   loadInBackground = !loadInBackground;
>   // fall through
> case "tab":
>   urls = homePage.split("|");
>   gBrowser.loadTabs(urls, loadInBackground);
>   break;
> case "window":
>   OpenBrowserWindow();
>   break;
> }

Reproducible: Always

Steps to Reproduce:
1. Middle-click on the home-button while holding shift.
Actual Results:  
The homepage opens in a new SELECTED tab.

Expected Results:  
The tab should load in the background when loadBookmarksInBackground is set to false and the shift-button is pressed.

Updated

10 years ago
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: uiwanted
(Assignee)

Comment 1

10 years ago
Created attachment 329305 [details] [diff] [review]
patch - fix as described in comment #0

This patch fixes the problem.
Attachment #329305 - Flags: ui-review?(beltzner)
Attachment #329305 - Flags: review?(dao)
(Assignee)

Updated

10 years ago
Whiteboard: [has patch] [needs review dao]
(Assignee)

Comment 2

10 years ago
Dão, what do you think of this patch?

Updated

10 years ago
Attachment #329305 - Flags: review?(dao) → review+
(Assignee)

Updated

10 years ago
Whiteboard: [has patch] [needs review dao] → [has patch] [needs review beltzner]
(Assignee)

Comment 3

9 years ago
Created attachment 336697 [details] [diff] [review]
patch - update to tip, see comment #0 for description
Attachment #329305 - Attachment is obsolete: true
Attachment #336697 - Flags: ui-review?(beltzner)
Attachment #329305 - Flags: ui-review?(beltzner)
(Assignee)

Updated

9 years ago
Assignee: nobody → klaas1988
Status: NEW → ASSIGNED
Flags: wanted-firefox3.6?
Flags: wanted-firefox3.6?

Updated

8 years ago
Blocks: 565517
No longer blocks: 565517
Whiteboard: [has patch] [needs review beltzner] → [has patch]
Attachment #336697 - Flags: ui-review?(beltzner) → ui-review+
You need to log in before you can comment on or make changes to this bug.