Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use the middle mouse button to open links in new tabs and to close tabs.

But sometimes, clicking the middle mouse button opens links in the current tab instead of in a new tab. It's not random - I noticed it usually happens when I click on popup links - such as thumbnails or links that open an image in a popup window (just like here).

I checked and this problem doesn't exist in Firefox (14.0.1).
My Google Chrome version is 22.0.1229.94.

Why does that happen?
Can I force the middle mouse button click to always open links/images in a new tab?

share|improve this question
    
I really want to kill whoever does it. –  jokoon Aug 11 '13 at 17:33
add comment

2 Answers 2

up vote 10 down vote accepted

This happens because a so called lightbox script is attached to the links. So if you've activated javascript execution (which is the default on popular browsers), the lightbox script attaches to the images and opens them in a neat in-page viewer. This script seems to be programmed to react to the left and middle mouse buttons (which definitely is not good style).

There are several things you could try:

  • Disable javascript completely or for single pages (doesn't sound like a good solution nowadays).
  • Use the right mouse button and choose Open Link in New Tab.
  • Install the middle click mini browser extension. It prevents page scripts from setting middle mouse button event handlers.
share|improve this answer
1  
middle click mini is great! Thanks for the link. But why does it work on Firefox by default? I have javascript installed, and clicking the mouse middle button in Firefox always opens links in a new tab. –  amiregelz Nov 6 '12 at 14:25
1  
As picospuch writes in his answer to your question, this may depend on how the browser handles mouse input events. Is looks like Firefox doesn't tell the script inside the webpage about middle mouse clicks on links but rather handles the click event itself. –  Daniel Calliess Nov 6 '12 at 14:36
add comment

No, you can't. This is because of the different process of middle click between firefox and chrome. You know that, browser must run code from the webpage(it's so-called javascript) and of course from itself. the code in the webpage may firstly get the event of your middle click on chrome. firefox may open a new tab and not pass the event to the webpage. It depends on implementation of browser. I think they are both right.

BTW, you can always use CTRL + click to open a link in new tab.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.