为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Middle click on link not opening in new tab

  • 7 个回答
  • 4 人有此问题
  • 14 次查看
  • 最后回复者为 cor-el

more options

Normally, middle clicking on a link will open the link in a new tab - that's what I want it to do. But some days middle clicking on a link will act like left clicking on a link, opening the page in THIS tab instead of a new one (leaving the page I was on). Anywhere else in the OS middle click is acting normally; it's a firefox problem.

Normally, middle clicking on a link will open the link in a new tab - that's what I want it to do. But some days middle clicking on a link will act like left clicking on a link, opening the page in THIS tab instead of a new one (leaving the page I was on). Anywhere else in the OS middle click is acting normally; it's a firefox problem.

所有回复 (7)

more options

Enter about:config in the address bar. In the search panel enter "click" w/o quotes. Make sure browser.tabs.opentabfor.middleclick is set to true.

more options

Start Firefox in Safe Mode to check if one of the extensions ("3-bar" menu button or Tools -> Add-ons -> Extensions) or if hardware acceleration is causing the problem.

  • Switch to the DEFAULT theme: "3-bar" menu button or Tools -> Add-ons -> Appearance
  • Do NOT click the "Refresh Firefox" button on the Safe Mode start window

It is possible that there is JavaScript onclick is involved in the link that overrides this behavior.

Does this happen randomly or can you reproduce this on specific web pages?

more options

I found out that I can reproduce it on specific web pages. Middle click on any of the word rectangles here: http://www.thesaurus.com/browse/bug?s=t (but other links like in the menu etc do not have the problem)

Also, on that page right clicking on links acts like left click too! (But I know I have seen pages where middle click acts like left click and right click acts properly - I know because I was right clicking and choosing open in new tab)

Feels like a bug in firefox because I see nothing odd about the html for those links.

more options

All those links have a JavaScript onclick event listener attached that intercepts all mouse click and opens the link in the current tab.

more options

What in that code indicates to you that the links have javascript onclick event listeners attached to them? (I would like to learn how to spot it)

I wonder if there is an addon to force proper behaviour

more options

soundwave said

What in that code indicates to you that the links have javascript onclick event listeners attached to them? (I would like to learn how to spot it) Right-click an empty spot on the page and choose View Page Source. Do CTRL+F and search for onclick. I wonder if there is an addon to force proper behaviour

The Web Developer extension's toolbar has a Disable button where you can easily disable/enable Javascript.

more options

The 'ev' button that you see in the screenshot at the end of a line shows that an onclick handler is attached.