Closed
Bug 90459
Opened 23 years ago
Closed 21 years ago
ondblclick event not fired when assigned in JavaScript
Categories
(Core :: DOM: Events, defect, P3)
Core
DOM: Events
Tracking
()
VERIFIED
FIXED
mozilla1.1alpha
People
(Reporter: Hartmut_Honisch, Assigned: joki)
References
Details
Attachments
(2 files, 1 obsolete file)
1.02 KB,
text/html
|
Details | |
3.11 KB,
patch
|
sicking
:
review+
peterv
:
superreview+
brendan
:
approval1.4+
|
Details | Diff | Splinter Review |
The A.OnDblClick event doesn't get fired when it is assigned via JavaScript. Here is a (non-working) example: ... <A id="element2" href="#">Dblclick me</A> <SCRIPT LANGUAGE="JavaScript"> document.getElementById('element2').ondblclick = new Function('window.alert ("DoubleClick")'); </SCRIPT > ...
Reporter | ||
Comment 1•23 years ago
|
||
Comment 2•23 years ago
|
||
I can confirm this bug with the 20010710 nightly on Windows 2000. All doubleclick items in the testcase fail. The reporter does not mention it, but assigning the event in HTML, such as with <a href="#" ondblclick="window.alert('DoubleCLick')">DoubleClick Me</a> works fine with this build (contrary to the report in bug 85518). So this looks to be a problem strictly with JavaScript DOM assignment of the ondblclick event. I cannot find a duplicate that is related to JavaScript assignment of the event. Bug 29473 seems to be both Mac specific and related to particular Input elements (not A).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 4•23 years ago
|
||
onclick works fine.
This bug still exists in Build 2001-09-14-05-0.9.4 on Windows 2000 Service pack 1. A.OnDblClick event doesn't get fired.
OS: Windows 98 → Windows 3.1
Assignee | ||
Updated•23 years ago
|
Target Milestone: --- → mozilla1.1
Assignee | ||
Comment 6•23 years ago
|
||
*** Bug 112302 has been marked as a duplicate of this bug. ***
This bug affects Windows2000 - still a problem in RC2. It seems that this is a major bug and should be fixed by 1.0. Several of our sites rely on the ondblclick event and have had to be tweaked (using onclick) just to make them work with Netscape 6. Was really hoping that this would be fixed in Mozilla 1.0 and next version of Netscape! This worked fine in Netscape 4. Please switch OS field to All (its not just Windows 3.1)
Comment 8•22 years ago
|
||
DIGBug!! Has there been any progress on this bug? Its been opened since 7/12/2001. I tested this bug on Mozilla 2002041617 and it still doesn't work. The only workaround that I'm aware of is the following: 1) Register for the onclick handler 2) Check the event detail to see if its == 2 3) If it is, call your ondblclick handler. For example: // Doesnt work on NS6, workaround to use onclick // table.ondblclick = mydblclickHandler; table.onclick = function(evt) { if (evt.detail == 2) mydblclickHandler(evt); } On double click handlers are used throughout all of our DIG applications. This would be a useful fix. Is my suggested workaround the recommened way to workaround this bug?
I wonder if nobody is bothering to look into this bug because OS is listed as Win3.1 and severity as minor. Can somebody switch the OS field to "All" and severity to "normal" or "major"?
Comment 10•22 years ago
|
||
joki--is this something that can be easily investigated?
Severity: minor → normal
OS: Windows 3.1 → All
Hardware: PC → All
Comment 11•22 years ago
|
||
*** Bug 131862 has been marked as a duplicate of this bug. ***
Comment 12•22 years ago
|
||
I've just encountered this bug in Mozilla 1.1 alpha running on Windows XP - my attempts to attach an ondblclick event to various elements through javascript all failed: <div id="hi">double click me!</div> <script> document.getElementById('hi').ondblclick = alert('you doubleclicked'); </script>
Comment 13•22 years ago
|
||
Maybe this is an easier workaround (and forward compatible): var el=document.getElementById('hi'); if (el.addEventListener) el.addEventListener("dblclick", hello, false) else el.ondblclick = hello;
Comment 14•22 years ago
|
||
Considering how simple the workaround in comment #8 is, could the actual bug fix be just as simple? Could somebody please investigate? Its a regression from NS4 and support for a basic DOM event, and its been open for over a year now, and targetted 1.1alpha! Please!? :)
Comment 15•22 years ago
|
||
*** Bug 173959 has been marked as a duplicate of this bug. ***
Updated•22 years ago
|
Priority: -- → P3
Comment 16•21 years ago
|
||
ondblclick was missing from the DOM
Comment 17•21 years ago
|
||
sorry, bad patch. here's a good one.
Attachment #125033 -
Attachment is obsolete: true
Updated•21 years ago
|
Attachment #125034 -
Flags: superreview?(peterv)
Attachment #125034 -
Flags: review?(bugmail)
Updated•21 years ago
|
Attachment #125034 -
Flags: superreview?(peterv) → superreview+
Attachment #125034 -
Flags: review?(bugmail) → review+
Comment 18•21 years ago
|
||
This one is a nobrainer. Function just totally missing from the DOM.
Flags: blocking1.4+
Comment 19•21 years ago
|
||
Fix checked in to trunk.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•21 years ago
|
Attachment #125034 -
Flags: approval1.4?
Comment 20•21 years ago
|
||
Comment on attachment 125034 [details] [diff] [review] better patch a=brendan@mozilla.org for 1.4. /be
Attachment #125034 -
Flags: approval1.4? → approval1.4+
Comment 21•21 years ago
|
||
Using winxp branch build 20030612 and linux trunk build 20030611 this fixed per attached test case in comment 1 Verified branch and trunk Note: with builds before fix I did see the problem using test case.
Status: RESOLVED → VERIFIED
Keywords: fixed1.4 → verified1.4
You need to log in
before you can comment on or make changes to this bug.
Description
•