Open
Bug 697059
Opened 12 years ago
Updated 6 months ago
preventDefault on right-click can cancel context menu (despite pref)
Categories
(Firefox :: Menus, defect)
Tracking
()
UNCONFIRMED
People
(Reporter: dustbin, Unassigned)
Details
(Keywords: ux-control, Whiteboard: [bugday-20131106])
Attachments
(1 file)
254 bytes,
text/html
|
Details |
In the options I forbit JS to deactivate or exchange the context-menu. But this simple jQuery-Code hides my browser-context-menu. $(function(){$(document).bind('click',function(e){e.preventDefault()})});
Comment 1•12 years ago
|
||
Should we just not allow content to .preventDefault for click events?
Comment 2•12 years ago
|
||
Also, I don't think this needs to remain security-private: there is no exploit, just malfunctioning of a user-control preference.
Group: core-security
![]() |
||
Comment 3•12 years ago
|
||
Sites commonly rely on preventDefault for click events to work, at least for left-click, for basic functionality (like progressive enhancement from links to XHR-based replacement). For right-click sites use it to try to put in their own context menu, mostly. We can break that and see how much screaming we get, I guess.
Comment 4•12 years ago
|
||
Yeah, I just mean for right-click. Or when site context menus are disabled, just ignore the defaultPrevented status of the (right) click event?
Comment 5•12 years ago
|
||
And Ctrl+click on Mac, presumably.
Keywords: ux-control
Summary: Prevent JS from deactivating context menu → preventDefault on right-click can cancel context menu (despite pref)
Still present in 15.x (how is this still unconfirmed?): <head> <script type="text/javascript"> document.onmousedown=ffdisable; message="Sorry, I've hijacked your browser's UI because I'm awake all night worried people will steal my images =["; function ffdisable(e) { if (e.button==2) { e.preventDefault(); e.stopPropagation(); alert(message); } } </script> </head> Also,
![]() |
||
Comment 8•10 years ago
|
||
With firefox-25.0.ru.linux64 and 2013-11-06-03-02-00-mozilla-central-firefox-28.0a1.en-US.linux-x86_64, the context menu appears no matter what value dom.event.contextmenu.enabled has. However, the menu doesn't work until clicked (is it unfocused?).
![]() |
||
Updated•10 years ago
|
Whiteboard: [bugday-20131106]
![]() |
||
Comment 9•10 years ago
|
||
Note: the menu appears under/behind the alert box.
Updated•6 months ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•