Join us and the lead editor of IRL, Mozilla's multi-award-winning podcast, for a behind-the-scenes look at the pod and to contribute your ideas for the next season, themed: "AI and ME." Mark your calendar and join our Community Call on Wednesday, Aug 7, 17:00–17:45 UTC. See you there!

Caută ajutor

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Află mai multe

Acest fir de discuție a fost arhivat. Adresează o întrebare nouă dacă ai nevoie de ajutor.

How do I stop Firefox from switching to new tabs for links that would normally open in new windows?

  • 2 răspunsuri
  • 2 au această problemă
  • 1 vizualizare
  • Ultimul răspuns de cor-el

more options

I am using "browser.link.open_newwindow.restriction" to force links that normally open in new windows, to instead open in new tabs. It all works fine, except when I click those links, Firefox switches to the new tabs immediately when I click them. I would like the tabs to open in new tabs but I do not want Firefox to immediately switch to them.

Please note that I have unchecked "When you open a link in a new tab, switch to it immediately". Meaning, Firefox correctly does not switch to new tabs for normal links. However, it is switching to the new tabs for links that would normally open in new windows.

I am using "browser.link.open_newwindow.restriction" to force links that normally open in new windows, to instead open in new tabs. It all works fine, except when I click those links, Firefox switches to the new tabs immediately when I click them. I would like the tabs to open in new tabs but I do not want Firefox to immediately switch to them. Please note that I have unchecked "When you open a link in a new tab, switch to it immediately". Meaning, Firefox correctly does not switch to new tabs for normal links. However, it is switching to the new tabs for links that would normally open in new windows.

Soluție aleasă

There are separate settings for these two different cases:

  • User directs a link to open in a new tab -- this is the checkbox
  • Firefox diverts a new window to a new tab -- this requires a visit to the Configuration Editor:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

(2) In the search box in the page, type or paste inback and pause while the list is filtered

(3) Double-click the browser.tabs.loadDivertedInBackground preference to switch the value from false to true

Success?

More info on about:config: Configuration Editor for Firefox.

Citește acest răspuns în context 👍 2

Toate răspunsurile (2)

more options

Soluție aleasă

There are separate settings for these two different cases:

  • User directs a link to open in a new tab -- this is the checkbox
  • Firefox diverts a new window to a new tab -- this requires a visit to the Configuration Editor:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

(2) In the search box in the page, type or paste inback and pause while the list is filtered

(3) Double-click the browser.tabs.loadDivertedInBackground preference to switch the value from false to true

Success?

More info on about:config: Configuration Editor for Firefox.

more options

These prefs on the about:config page control whether links are opened with a left-click in the background or get focus.
You can toggle the default action by holding the Shift key down when you use Ctrl plus left-click or middle-click a link.

  • browser.tabs.loadInBackground (normal links)
  • browser.tabs.loadDivertedInBackground (javascript and external links)
  • browser.tabs.loadBookmarksInBackground (bookmarks)
  • browser.search.context.loadInBackground (context menu: Search)

This pref determines whether to open a link in the current tab if this is an empty tab or always open a link in a new tab.

  • browser.tabs.loadBookmarksInTabs = true