Closed Bug 83502 Opened 24 years ago Closed 7 years ago

ondblclick doesn't work with double right click

Categories

(Core :: DOM: Events, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 968265
Future

People

(Reporter: vladimire, Unassigned)

References

Details

(Whiteboard: [br])

Attachments

(2 files, 1 obsolete file)

If you attach your event handler using "document.onclick = handlerFunc;" notation the e.preventDefault(); method doesnt cancel the default. However if you attach the event using addEventListener() it does.
Actually sometimes it does work, but sometimes it doesnt, when with addEventListener it works all the time. Attaching a testcase in which addEventListener part is comented out, so it shows only the buggy part. If you want to compare download the test and uncoment the addEventListener part, and coment the document.onblah part.
Summary: e.preventDefault(); method doesnt work for javascript event handlers → e.preventDefault(); method doesnt always work for javascript event handlers
Attached file test - right click many times (deleted) —
Target Milestone: --- → mozilla0.9.3
Attached file testcase (obsolete) (deleted) —
In the testcase I just posted, it demonstrates that ondblclick isn't capturing the dblclick event.
changing summary from e.preventDefault(); method doesnt always work for javascript event handlers to ondblclick doesn't work
Summary: e.preventDefault(); method doesnt always work for javascript event handlers → ondblclick doesn't work
err changing again from ondblclick doesn't work to ondblclick doesn't work with double right click
Summary: ondblclick doesn't work → ondblclick doesn't work with double right click
Missed the 0.9.3 train.
Whiteboard: [br]
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Priority: -- → P4
Why should double right clicking be interpreted a double click? That doesn't make sense to me.
Blocks: 91338
If the double click event should not work with double right click then double right click should not bring up the context menu.
basic: single right-clicking brings up a context menu. How could double right-clicking not bring up a context menu? And why do you think it shouldn't?
Well, you said that there should the double click event should not work with double right click. So I assumed that there should be no double right click event at all. Note that addEventListener("dblclick",dblclick,0); works in the testcase its just ondblclick = dblclick; that doesn't.
->0.9.5
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Moving to 0.9.6
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Moving to 0.9.6
0.9.6 has passed, moving to 0.9.7. Load balancing 0.9.7 list shortly
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Attached file tescase ( mouse events ) (deleted) —
Attachment #43099 - Attachment is obsolete: true
Moving bugs from 0.9.7 for triaging in 0.9.8
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Did anyone notice that the onclick event handler *on the div elements* doesn't trigger if you right (context menu) click on them - only the onmousedown and onmouseup event handlers trigger. However all three event handlers on the document element trigger. I have been messing with this and the document element seems to be the only element whos onclick event handler will fire if evt.button=2. Perhaps this is to do with the preventDefault() stoping it at all and not just stopping the context menu comming up? Or perhaps not. I was going to file this as a separate bug on this problem, but will this comment be enough to get something done about it?
Target Milestone: mozilla0.9.9 → mozilla1.1
Basic: do you still think a double-click event (rather than just a second click event or mouseup/mousedown pair) should be sent for double-right clicking? If you do, can you explain why? I think that when most people set double-click events, they only intend to intercept double-left-clicks.
retargeting
Target Milestone: mozilla1.1alpha → Future
(In reply to comment #19) > Basic: do you still think a double-click event (rather than just a second click > event or mouseup/mousedown pair) should be sent for double-right clicking? If > you do, can you explain why? I think that when most people set double-click > events, they only intend to intercept double-left-clicks. is Basic gone? We still don't know what the significant benefit is to having both mouse buttons do the same thing (Jesse's question above)? Anyway, this sounds like a really *bad* direction. It's a non-standard use of the right button. Also I'd think most people won't discover the new capability, so there may be unintended surprising consequences for them. Not much interest in it either - no votes, no dups and almost no cc:
Assignee: joki → events
Severity: normal → enhancement
OS: Windows 98 → All
Priority: P4 → --
QA Contact: vladimire → ian
Hardware: PC → All
Assignee: events → nobody
QA Contact: ian → events
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: