How do I prevent a site's JS from changing the context menu?
All Replies (3)
You can change a preference in Firefox so that even if the site shows a menu, Firefox's menu shows in front of it. When you need to use the site's menu, you can tap the Alt key to "peel off" Firefox's menu. This is what I use and it's 99% accurate and 25% annoying.
Recently, I learned that if you hold down the Shift key while right-clicking, Firefox will usually show its own menu and ignore the site's menu. So you might try that first.
Setting change to always show Firefox's menu in front
(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.
(2) In the search box in the page, type or paste context and pause while the list is filtered
(3) Double-click the dom.event.contextmenu.enabled preference to switch the value from true to false
More info on about:config: Configuration Editor for Firefox.
Thanks for the quick reply! I figured there'd be something in config, but I'm hesitant to change much there, so thanks for the confirmation! This works beautifully most of the time, but I've noticed that sometimes on one site both context menus appear (FF's above and the site's below). Don't suppose there's a fix for that?
No fix, I just tap the Alt key to peel off Firefox's menu. Esc may also work but that can close both menus.