Closed
Bug 864096
Opened 12 years ago
Closed 4 years ago
middle-click and right-click on element-node don't fire event handler
Categories
(Core :: DOM: Events, defect, P5)
Tracking
()
RESOLVED
INVALID
People
(Reporter: hwang-kw, Unassigned)
References
()
Details
(Whiteboard: DUPME)
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:20.0) Gecko/20100101 Firefox/20.0
Build ID: 20130409194949
Steps to reproduce:
1. clicked an element node.
2. Did middle-click and right-click on element node
Actual results:
1. When left-click on any element node, click event fires.
2. However, when middle-click or right click, it triggers the event handler which is attached on #document only.
Expected results:
2. Event handler which is attached on element node should fire.
// Explanation
document.onclick = docHandler;
document.body.onclick = bodyHandler;
divElement.onclick = divHandler;
1. clicking 'divElement' fires all event Handlers. (divHandler, bodyHandler, docHandler)
2. but middle-clicking and right-clicking fires docHandler only.
3. On the contrary
document.onmousedown = docHandler;
document.body.onmousedown = bodyHandler;
divElement.onmousedown = divHandler;
In this case, all mousedown events work properly.
Updated•12 years ago
|
Whiteboard: DUPME
Summary: middle-click and right-click on element-node don't fire click event → middle-click and right-click on element-node don't fire event handler
Comment 2•9 years ago
|
||
Confirmed. I just stumbled upon the issue found this stackoverflow where users also report in the comments that it (only) doesn't work in Firefox: http://stackoverflow.com/questions/1795734/triggering-onclick-event-using-middle-click
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•4 years ago
|
||
Bulk-downgrade of unassigned, 4 years untouched DOM/Storage bugs' priority.
If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.
Severity: normal → S4
Priority: -- → P5
Comment 4•4 years ago
|
||
Closing as middle/secondary clicks are not supposed to fire click events. auxclick is for them now.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•