Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Wrong offset for the right-click menu → Right-click on link immediately opens link in new tab unless button is held (at least three years old bug)

  • 2 回覆
  • 1 有這個問題
  • 6 次檢視
  • 最近回覆由 SamXubuntu

more options

Hi. There is this at least three years old GUI bug that is not yet fixed, I'm writing this post to show the temporary workaround and hopefully get more interest in the bug itself. This would be an urgent usability bug, but it's still here because probably not everyone can reproduce it.

Link to one of the bug reports: https://bugzilla.mozilla.org/show_bug.cgi?id=1504021


> Description

Removing the title bar doesn't set an offset for the right-click menu → the right-click menu will appear slightly wrong positioned, with its first entry below the mouse cursor → the first entry of the menu will get a mouse-release event and will trigger.

The effect of this can be different depending on what you right-click:

  • right-click some empty area in a web-page: you will be taken back to the previous page (because the first menu entry does that)
  • right-click a link: you will open the link in a new tab (because the first menu entry does that)


> Steps

  • Have a non-maximized Firefox window.
  • Disable the title bar (through the "Customize..." option)
  • Right-click anywhere on a webpage: you will be taken to the previous page.


> Workaround

Enable user styles by setting toolkit.legacyUserProfileCustomizations.stylesheets to true. Create "chrome" folder in your profile directory. Inside, create "userChrome.css", and write:

   #contentAreaContextMenu{ margin: 20px 0 0 20px }
Hi. There is this at least three years old GUI bug that is not yet fixed, I'm writing this post to show the temporary workaround and hopefully get more interest in the bug itself. This would be an urgent usability bug, but it's still here because probably not everyone can reproduce it. Link to one of the bug reports: https://bugzilla.mozilla.org/show_bug.cgi?id=1504021 > Description Removing the title bar doesn't set an offset for the right-click menu → the right-click menu will appear slightly wrong positioned, with its first entry below the mouse cursor → the first entry of the menu will get a mouse-release event and will trigger. The effect of this can be different depending on what you right-click: * right-click some empty area in a web-page: you will be taken back to the previous page (because the first menu entry does that) * right-click a link: you will open the link in a new tab (because the first menu entry does that) > Steps * Have a non-maximized Firefox window. * Disable the title bar (through the "Customize..." option) * Right-click anywhere on a webpage: you will be taken to the previous page. > Workaround Enable user styles by setting toolkit.legacyUserProfileCustomizations.stylesheets to true. Create "chrome" folder in your profile directory. Inside, create "userChrome.css", and write: #contentAreaContextMenu{ margin: 20px 0 0 20px }
附加的畫面擷圖

由 SamXubuntu 於 修改

所有回覆 (2)

more options

Did you try the workaround in comment 10 to modify a pref on the about:config page ?

  • ui.context_menus.after_mouseup
  • bug 1504021 - Right-click on link immediately opens link in new tab unless button is held
more options

I'm fine with the workaround described in my OP.

I've opened another bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1625774