Search code examples
javascriptgoogle-chromehyperlinktabbed-browsing

Why does middle-clicking on a link also load in the current tab?


For some websites (e.g. try these main menu navigation links), pressing down with the mouse's click-wheel not only opens a new tab, but also loads that link in the current one.

Why is that?


This happens in Chrome (on Windows 7), but not in IE9 (funnily enough).

When using the right-click contextual menu, selecting "open link in new tab" seems to avoid this functionality. This makes me think it's a browser issue, and not tp do with buggy JavaScript on certain websites.


Solution

  • If it works with the right click, it means the website is messing with the middle click.

    Thus, the website's JS code is messy.