Shift+right click shows context menu even if disabled in javascript

RESOLVED DUPLICATE of bug 692139

Status

()

RESOLVED DUPLICATE of bug 692139
5 years ago
a year ago

People

(Reporter: raphael.jakse, Unassigned)

Tracking

25 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 780243 [details]
shiftclick.html

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20130723 Firefox/25.0 (Nightly/Aurora)
Build ID: 20130723030205

Steps to reproduce:

1) disable context menu in javascript on a surface:
<script>
     window.onload = function() {
         window.oncontextmenu = window.onclick = function(e) {
            e.preventDefault();
            e.stopPropagation();
            return false;
         }
     }
</script>
2) Load the page in the browser
3) right click on this surface
4) shift+click on this surface


Actual results:

3) if the user allows Javascript to disable context menus, the context menu doesn't appear, as expected.
4) the context menu appears


Expected results:

3) this is the right behavior
4) This is unexpected if the user allows Javascript to disable context menus, the context menu should not appear.
(Reporter)

Updated

5 years ago
Attachment #780243 - Attachment mime type: text/plain → text/html

Comment 1

5 years ago
This is a feature not bug.

http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#context-menus

"User agents may provide means for bypassing the context menu processing model, ensuring that the user can always access the UA's default context menus. For example, the user agent could handle right-clicks that have the Shift key depressed in such a way that it does not fire the contextmenu event and instead always shows the default context menu."
(Reporter)

Comment 2

5 years ago
Thanks Alice for your reply and sorry for the invalid reporting. setting to RESOLVED DUPLICATE (after your comment, I found this https://bugzilla.mozilla.org/show_bug.cgi?id=692139 which didn't show during my search before reporting this one)

However, this behavior can be annoying for making web applications that need a lot of actions in the mouse and other browsers do not behave this way.

I think this behavior should be reconsidered. Is shift+right click really used?
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 692139

Updated

a year ago
See Also: → bug 1322967
You need to log in before you can comment on or make changes to this bug.