Prevent new tab from closing previous tab in Firefox

3

I'm on Firefox 59.0.1.

Some adult image sites have a feature where clicking a link would open a new tab while closing the parent tab, i.e. the tab on which I clicked the link.

I have the "Don't touch my tabs" extension installed, which does not stop this behaviour.

I've tried blocking scripts on the image sites, which simply breaks the entire site.

Is there an in-browser way to prevent this behaviour?

user883398

Posted 2018-03-17T02:33:15.503

Reputation: 31

1Replacing the current tab is the default behavior. I believe there is a setting to make "open in new tab" the default. You can also right-click on the link and select the "open in new tab" option. – fixer1234 – 2018-03-17T02:41:40.207

Just ctrl click new link... just do it – DarkCygnus – 2018-03-17T07:24:12.600

Essentially, the advertising tab takes over the parent tab. You already received some great advice from @fixer1234: if you right-click the hyperlink and select Open Link in New Tab, it will open your desired tab and the advertising tab separately while leaving your original tab intact. – Run5k – 2018-03-17T18:13:36.620

Answers

1

I have had the same problem until I found that the uBlock Origin add-on has an option 'Click to block all popups on this site'.

Funny thing is that I was looking for the same fix as you are a while ago but it was in uBlock Origin the whole time which I've been using for years!! Took me ages to find the answer though.

mzl adl

Posted 2018-03-17T02:33:15.503

Reputation: 31

1Welcome to Super User. It isn't clear what blocking popups has to do with the question. – fixer1234 – 2018-03-17T10:06:17.517

The relevance is that some sites, out of a combination of malice and ignorance / stupidity, have links (<a …>) with an onclick attribute that calls JavaScript code that explicitly opens a new URL in a new tab (bypassing the normal href= mechanism) and then maybe does something else in the original tab. That’s what the question is about, and that’s why the Q mentions “blocking scripts”. A page that is opened in a new tab by a call to JavaScript’s open() function probably looks enough like a pop-up to be blocked by this add-on. But I’m not clear how this answers the question, either. – Scott – 2018-03-17T18:45:21.053