Firefox right-click menu offset

I hit this on a Firefox upgrade sometime ago: the context menu (i.e., the “right-click” menu) would be placed right under my mouse cursor, so if I wanted to click, release, and then select my menu option, the menu option that happened to be in the top-left corner of the menu would be activated when I released the right-mouse button (currently, that’s a navigation to the previous page in history). Very annoying. I lost track of the Q&A post that led me to the solution, but basically it’s to add the following to ~/.mozilla/firefox/<your_profile_directory>/chrome/userChrome.ccs:

#contentAreaContextMenu{ margin: 10px 0 0 10px }

Restart Firefox after changing that file and now your context menus will be nicely offset from the cursor location. Ah. So much better.

A Mozilla resource on this CCS class and others:
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Firefox_menus

Leave a Reply