contextmenu event not firing when shift key down




8 years ago
Last year


(Reporter: david.allen, Unassigned)



7 Branch
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)



(1 attachment)

User Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Build ID: 20110930134807

Steps to reproduce:

Press SHIFT key and Right mouse button to trigger the contextmenu DOM event. See example script below :

  function handle_contextMenu(e) {console.log("handle_contextMenu received")}
  <h2  oncontextmenu="handle_contextMenu(event)">heading</h2>

Actual results:

With  Firefox 6, when the shift key is held down and right mouse button pressed, this triggered the contextmenu DOM event.
Under Firefox 7.0.1 this event is not longer triggered (when SHIFT key + right mouse).

Expected results:

The DOM contextmenu event should be triggered, when the shift key is held down and right mouse button pressed.
This is useful in situations like the ExtJS grid, for selecting multiple rows.
Posted file User's Test Case
Confirmed on Mozilla/5.0 (Windows NT 5.1; rv:10.0a1) Gecko/20111005 Firefox/10.0a1 ID:20111005030932

Open attached test case
Right click on Heading -> Event fired
Hold down shift key + click on heading -> Event NOT fired
Confirming on Win XP, FF7 and FF10. The context menu is shown, but the function is not executed (at least not the console.log()).
Component: General → DOM: Events
Ever confirmed: true
OS: Linux → All
Product: Firefox → Core
QA Contact: general → events
Hardware: x86 → All
Here it comes:
Last good nightly: 2011-06-19
First bad nightly: 2011-06-20


Looks intentional: Bug 617528 ...

I add that other modifier keys (Ctrl, Alt) work fine, only Shift has the problem.
> Looks intentional: Bug 617528 

Indeed.  In particular, see bug 617528 comment 20 for the spec quotes and such...
Blocks: 617528
This is a feature not bug...

"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."
:bz, :janv: If it's intentional, then I suppose this bug should be RESOLVED INVALID?
(In reply to Tony Mechelynck [:tonymec] from comment #7)
> :bz, :janv: If it's intentional, then I suppose this bug should be RESOLVED

yes, I think so
Closed: 8 years ago
Resolution: --- → INVALID
Duplicate of this bug: 897379
You need to log in before you can comment on or make changes to this bug.