Open Bug 1467158 Opened 7 years ago Updated 6 months ago

contextmenu event (oncontextmenu) does not fire on Shift-Right-Click

Categories

(Core :: DOM: Events, defect, P3)

60 Branch
All
Windows
defect

Tracking

()

Tracking Status
firefox60 --- affected
firefox61 --- affected
firefox62 --- affected

People

(Reporter: axenicely, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36 Steps to reproduce: <!DOCTYPE html><html><head><script> document.oncontextmenu = function( evt ) { alert('ok') ; evt.preventDefault() } ; </script></head><body></body></html> Actual results: With right-click, ctrl-right-click, or alt-right-click, 'ok' is displayed and the context menu is NOT displayed. With shift-right-click, the event doesn't fire; 'ok' is not displayed, and the context menu is displayed. Expected results: The contextmenu event should fire before the context menu is displayed, so it should fire when shift-right-click is pressed.
User Agent: Mozilla/5.0 (Windows NT 6.3; rv:60.0) Gecko/20100101 Firefox/60.0 Build ID: 20180605171542 I manage to reproduce this issue on Windows 8.1 x86 with the latest FF 60.0.2(32bit). Please note that this issue is also displayed on Windows 10 x64.
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Events
Ever confirmed: true
OS: Unspecified → Windows
Product: Firefox → Core
Hardware: Unspecified → All
Priority: -- → P3

I'm running into this now and can confirm the same issue for Firefox 67 on OSX 10.14.5

Shift+Right-click, as well as Ctrl+Shift+Left-click since its OSX, will the context menu without firing the contextmenu event. Both options will fire auxclick, but without the other event the context menu can't be supressed.

any update ?

I believe this is a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=897379#c1 and also invalid.

If this isn't a bug, why does shift-right-click behave differently than ctrl-right-click and alt-right-click, which behave as expected? Also, Chrome, Opera, MS Edge, IE 11, and IE 10, all behave as expected. (Also, note that the contextmenu event isn't firing. Even if displaying the context menu were intended, what reason could there be for the event not firing? The most reasonable explanation for all this is that the context menu is being displayed <i>because</i> the event isn't firing.)

I came here to complain about this bug, but after reading 897379 I understand that this is truly an intended feature and not a bug. Mozilla wants a way for the user to open the context menu no matter what, and they've picked Shift + Right click as the shortcut for this. This means the onContextMenu event is not fired which is unfortunate, but intended.

Severity: normal → S3

Can this be revisited? This is an issue for a remote desktop client like noVNC, where users want to be able to shift-right click their remote applications.

And can Firefox really go against the rest of the browsers here? Our users perceive this as a Firefox bug, since it works in Chrome.

I'm also not finding the quoted reference (from bug 897379) in the specifications any more. Has this perhaps already been discussed, and Firefox simply not updated?

Ping!

Could we get a verdict on if this behaviour is still desired? Should this be added as a webcompat issue?

You need to log in before you can comment on or make changes to this bug.