Open Bug 1757140 Opened 4 years ago Updated 3 years ago

Allow opening target=_blank in current tab

Categories

(Firefox :: Tabbed Browser, enhancement)

Firefox 97
enhancement

Tracking

()

People

(Reporter: linus.kardell, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0

Steps to reproduce:

It would be great to override the annoying target=_blank, so you're not forced to open the links in a new tab. Although there is browser.link.open_newwindow, that setting is not usable as it also affects pages opened by an external application.

The Bugbug bot thinks this bug should belong to the 'Firefox::Tabbed Browser' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Tabbed Browser

Could you please detail what exactly you want to achieve?
Maybe browser.urlbar.openintab meets your request, rather than browser.link.open_newwindow ?

Flags: needinfo?(linus.kardell+mozillabugs)

Links should open in the current tab when left clicked, even if marked with target=_blank. browser.link.open_newwindow=1 does this, but also has the side effect of making some other pages open in current tab as well, such as pages opened in Firefox by an external application.

Seems I've missed your reply in due time.
target=_blank is basically the definition of opening in new tab, otherwise it would open in the same tab. I'm uncertain why would we want all links to open always in the same tab.
Eventually, we could count this as an improvement to the already existing browser.link.open_newwindow !? Although to be honest, I'm not sure about what the specs for the changes would be.
Seeting on new to see where this enh. goes.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(linus.kardell)

Because usually that attribute is used to force opening a new tab for no reason.

At least I can get about the desired behavior with browser.link.open_newwindow=1 and browser.link.open_newwindow.override.external=3. That might be good enough.

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