Open 1j01 opened 4 years ago
Since some firefox updates is impossible to absolutely disable the context menu because if you disable it firefox core automatically sets the context menu shortcut to Shift + Right Click, the user itself can disable it in the firefox settings going to:
Tools > Options > Content > Advanced and the activate 'Enable Javascript' and 'Disable or replace context menus' settings.
Due to this I think this shouldn't be catalogued as 'bug'.
@AlexHRodrii How do I get to "Tools > Options > Content > Advanced"? What version of Firefox does this apply to?
Since the latests firefox updates you need to do aditional steps. Here it's a guide about how to disable the context menus.
Disabling dom.event.contextmenu.enabled
appears to disable the contextmenu
event entirely, making webpages unable to prevent the context menu in any case, so this wouldn't help anyone looking for a workaround.
I poked around and found some discussion of this on the Firefox bug tracker: 1, 2, 3. There doesn't seem to be many people pointing out use cases, so I might join the discussion. I'm writing my notes here in case I come back to this later:
Two use cases I see, aside from user interfaces that directly use Shift+right click as a gesture, are:
Right mouse button is used to access the secondary (background) color, and shift is used to make equal width/height shapes. Shift+right click is clearly an escape hatch for users of Firefox, to access the context menu on sites that block it willy-nilly. I'd like to preserve this ability where it doesn't conflict.
Plan: listen for and prevent
contextmenu
globally while canvas-related gesture is active. May need a timeout afterpointerup
ifcontextmenu
comes afterpointerup
.This should also fix dragging with right click over a window like About Paint showing a context menu. I'm not sure about the Help window, which uses an iframe to display the content.
This should also let me un-revert
setPointerCapture
for 98.js.org integration.