Open Bug 444911 Opened 16 years ago Updated 2 years ago

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

Categories

(Firefox :: General, defect)

x86
All
defect

Tracking

()

People

(Reporter: klaas1988, Unassigned)

Details

(Keywords: uiwanted, Whiteboard: [has patch])

Attachments

(1 file, 1 obsolete file)

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.
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: uiwanted
This patch fixes the problem.
Attachment #329305 - Flags: ui-review?(beltzner)
Attachment #329305 - Flags: review?(dao)
Whiteboard: [has patch] [needs review dao]
Dão, what do you think of this patch?
Attachment #329305 - Flags: review?(dao) → review+
Whiteboard: [has patch] [needs review dao] → [has patch] [needs review beltzner]
Attachment #329305 - Attachment is obsolete: true
Attachment #336697 - Flags: ui-review?(beltzner)
Attachment #329305 - Flags: ui-review?(beltzner)
Assignee: nobody → klaas1988
Status: NEW → ASSIGNED
Flags: wanted-firefox3.6?
Flags: wanted-firefox3.6?
Blocks: cuts-cruft
No longer blocks: cuts-cruft
Whiteboard: [has patch] [needs review beltzner] → [has patch]
Attachment #336697 - Flags: ui-review?(beltzner) → ui-review+

The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.

Assignee: klaas1988 → nobody
Status: ASSIGNED → NEW
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: