Open Bug 935191 Opened 11 years ago Updated 1 year ago

When middle clicking opens a tab in the background diverted windows should also open in the background

Categories

(Firefox :: Settings UI, defect, P3)

defect

Tracking

()

People

(Reporter: mossop, Unassigned)

References

Details

(Whiteboard: [fidefe-quality-foundations])

Attachments

(1 obsolete file)

We have an option in the preferences: "When I open a link in a new tab, switch to it immediately". This controls whether Firefox selects the new tab opened when you middle click a link. When "Open new windows in a new tab instead" is selected new windows open in (surprise!) a new tab however they are always selected unless you toggle a hidden preference. I think they should follow the setting above too. How the tab is opened shouldn't affect whether it is selected or not.
Severity: normal → S3
OS: macOS → All
Priority: -- → P3
Hardware: x86 → All
See Also: → 1081542
Version: unspecified → Trunk
Whiteboard: [fidefe-quality-foundations]

Actually, not 100% sure I follow this bug report. Is the "hidden preference" browser.tabs.loadDivertedInBackground ?

Flags: needinfo?(dtownsend)

Yes. Basically I think that setting in the settings UI should control both tabs open via middle click and tabs opened via clicks on links with target="_blank" rather than needing to go into about:config to change the latter.

Flags: needinfo?(dtownsend)

Am I correct that the following is the problem?

steps to reproduce:

  1. Open about:preferences
  2. Check "Open links in tabs instead of new windows" (the default option)
  3. Uncheck "When you open a link, image or media in a new tab, switch to it immediately" (the default option)
  4. open data:text/html,<a href="https://bugzilla.mozilla.org/" target="_blank">link</a>
  5. primary-click on "link" on the page
  6. (go back to the step 4's tab and) middle-click on "link" on the page

actual result:

  • new tab is opened and selected on step 5
  • new tab is opened but not selected on step 6

expected result:

  • new tab is opened but not selected on step 5
  • new tab is opened but not selected on step 6

Re: comment #3, I think so but I'll let Dave confirm.

It sounds like we should be able to get rid of the loadDivertedInBackground pref entirely.

Flags: needinfo?(dtownsend)

Yes, I think we should get rid of loadDivertedInBackground and just use the one setting "When you open a link, image or media in a new tab, switch to it immediately" to control whether new tabs are immediately focused regardless of how they are opened.

Flags: needinfo?(dtownsend)

Actually, the current Firefox behavior matches to Chrome and Safari, with the above steps.

With the default option, Chrome and Safari opens and select tab on step 5, and
opens a tab but doesn't select on step 6.

Safari has an option "when a new tab or window opens, make it active", which is unchecked by default.
when I check it, it opens and select tab both on steps 5 and 6.
So, this means primary-click on target="_blank" is not controlled by the option.

I don't find relevant option on Chrome.

while I agree on simplifying the prefs and behaviors, changing the default behavior for those operations could cause interop issue

Attachment #9386904 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: