Open
Bug 564691
Opened 15 years ago
Updated 3 years ago
dblclick event fired on multiple right mouse button clicks
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
NEW
People
(Reporter: pdp, Unassigned)
References
(Blocks 1 open bug)
Details
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7
Build Identifier: 1.9.2
If you rightclick multiple times on an element that has dblclick event listener, the event will trigger. Left mouse click followed by right mouse click will also trigger the event. It seems that this is especially problematic with Mac OS if you use an external mouse. Consider the following scenario:
1. Select an item from a tree view.
2. Right click to get context menu.
Since these two operations happen quite quickly, the result is a trigger of any dblclick event handlers which is the incorrect behaviour.
Reproducible: Always
Steps to Reproduce:
1. Create a treeview with dblclick event handler with one item and context menu.
2. Select the item (leftclick) and rightclick to get the context menu.
Works the best on macosx. On Linux and Windows just rightclick multiple times (more than twice) or alternate several lift and right mouse clicks.
Actual Results:
dblclick event fires
Expected Results:
dblclick event should not fire especially when the user interaction is leftclick followed by rightclick
Comment 1•12 years ago
|
||
that's a feature of windows. is this also a feature of mac OSX and linux too? I think yes. depending on your delay between clicks (repeat speed), you will get either double click or single click. 3+ rapid-in-a-row should get you a double-click. 1 in a row or one with enough time between (probably adjustable in the control panel/prefs) should give you a single click.
try ot on some other program and see what happens.
Comment 2•9 years ago
|
||
indeed, isn't this working as designed?
Comment 3•9 years ago
|
||
I think the question is whether there should be DOM dblclick events fired for non-primary mouse clicks. For example, we don't fire a DOM click event for a non-primary mouse click...
Olli, do you know whether this was discussed at all?
Flags: needinfo?(bugs)
Comment 4•9 years ago
|
||
We do fire click on window or document level for non-primary clicks (some ancient).
But we should remove that. Others (well, at least blink) are trying to remove click for non-primary too and there is a proposal to dispatch auxclick instead for non-primary.
Flags: needinfo?(bugs)
Comment 5•9 years ago
|
||
Right; I know all that. The question is what about dblclick.
Flags: needinfo?(bugs)
Comment 6•9 years ago
|
||
ah, that.
Ok, per current auxclick draft
"UIEvent.detail: indicates the current click count; the attribute value MUST be 1 when the user begins this action and increments by 1 for each click."
I think that covers this case.
Comment 7•9 years ago
|
||
In that we could stop firing dblclick for non-primary clicks and people who care could use auxclick, right?
Updated•5 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•