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)

20 Branch
x86
Windows XP
defect

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.
Component: Untriaged → DOM: Events
Product: Firefox → Core
// 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.
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
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
Depends on: 968265

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

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.