Sites where middle click opens in the same tab in Chromium. How to fix.

Middle clicking on a link with my mouse is supposed to open the link in a new tab. Increasingly, I’m finding sites where the link opens in the same tab, which is not what I want. I then have to click back, then right-click the link and and manually select open in new tab.

This doesn’t happen in Firefox, and it doesn’t happen for all sites. This page is a site where this occurs. If I middle click on the These timings link in the sixth paragraph from Chromium, it opens in that same page. This occurs whether I disable JavaScript on that site or not. It doesn’t happen for all links on that page, either. The ones that stay at the site open in new tabs. Only external links open in the same tab.

Here’s that same These timings link. Middle clicking on it from my post opens it in a new tab, so it’s something about the BBC News site, not the link itself.

How are they doing this? More importantly, how can I avoid this behavior? Is there some browser setting I can change?

Excellent! I never knew about that.

The wheel on my Microsoft mouse acts as a middle button–I knew that but never had a reason to use it. But I how have a good reason. Thank you!

I sure hope this disease you’ve identified doesn’t start affecting me too now that I have the tool.

Well I can confirm that this happens for me in Chrome too, but not Firefox or IE. Even more oddly, the link a little further down that page, to “Pale Blue Dot”, seems to behave normally on middle-click, and neither of those links seems to have any special CSS or JavaScript on them. Inspect Element and View Selection Source (in Chrome and Firefox respectively) show them as straightforward HTML links with no special parameters. This is very odd. I can’t explain it.

Are there any other examples of links that behave like this that you have discovered?

That’s strange. That link, “These timings”, is a simple standard A tag with an href attribute using a standard URL. I would blame it on scripting except that you say you’ve disabled that. Have you reloaded the page after disabling the Javascript?

Ctrl-click works as expected as does right-click then choosing “Open in new tab”. It’s only the middle click that has weird behavior.

I have identical behavior except for one thing: If I disable JavaScript, the weird behavior goes away and middle clicking the link works normally. Like davidm said, did you refresh the page after disabling JavaScript? You should see a little scroll with an X through it at the right of the location bar if JavaScript is disabled.

I did reload the page when i was testing, and had the same behavior. I just reloaded without javascript now, however, and the middle click did work correctly. I didn’t know to check for the no javascript icon earlier, so maybe it hadn’t fully reloaded then.

The Pale Blue Dot link is within the site. It’s only links to external sites that have that behavior. On that page, anyway. Another site I had this problem on was webmail hosted on, where the links for each message had the same annoying behavior, again only with Chromium. I’d expect those were on the same site, but I can’t check now, since they “upgraded” their webmail site.

So if it is JavaScript, how and why is it doing this, especially considering that they are regular HTML links without any JavaScript calls in the tag. And why is only in Chrome, and only (apparently) on external links?

I don’t know a solution to this problem, but there is a slightly easier workaround than this.

You can simply middle-click the back button. That will open the last page in a new tab.

That’s good to know. Thanks.

I did some more searching, and apparently this problem has been around long enough that there’s actually an extension you can install to fix it. :rolleyes: I think I’ll stick with disabling JavaScript.

Cool! Another new thing to help me browse faster.

At the moment I’m using Firefox, Rekonq, Chromium and Opera browsers on Arch Linux. Both of these suggestions work on all of them, except that middle clicking the back button doesn’t work on Opera.

I’d get the extension just in case you encounter this behavior on a site that won’t work without JavaScript. I’ve run into a few. ( has sections that don’t work. But I had to disable it because the pages are resource hogs with it enabled.)

Maybe if I run in to that. For now, I’ll disable JavaScript on websites that behave like that, that I go to regularly, and use Strinka’s technique otherwise.

I’m also trying out Opera, as an alternative to Chromium. Not sure I’m going to like it, though. It’s kind of a pain to get to regular bookmarks, and the bookmarks toolbar didn’t populate when I saved my Chromuim bookmarks and loaded them in Opera. But maybe I just don’t know what I’m doing.

This post posted from my Opera browser.

There don’t have to be calls explicitly in the tag. JavaScript elsewhere on the page can modify DOM elements and, among other things, bind event handlers to them. There may be script that binds a click event handler to those links. Maybe it binds it to all links as a class and then processes internal and external links differently, or maybe the internal and external links are different classes. I haven’t really examined that page that closely to see.

I also see that behavior on that page with Chrome on my computer. Why it would only affect Chrome, I can’t say.

What a frustrating and surprisingly complicated bug! I haven’t seen a bug number that low in Chromium’s bug tracker in a long time!

What it apparently comes down to (based on a very quick skim of the relevant bug histories) is that other browsers interpret “onclick” to not apply to middle clicks, whereas WebKit based browsers do.

I just left a comment on the Chromium bug.

Heh. That was an amusing read, in a perverse sort of way. Thanks for bumping it there. (Link for others who are interested.)

Welp, just got another reminder why I read the sdmb. Almost 20 years using browsers, and never knew this trick. I always used the Ctrl - Left MB to do the same thing.

click on the user’s name to the left of his post. Try to middle click to open his profile in a separate tab. Doesn’t work. Annoying, isn’t it?