WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 7790
ondblclick doesn't fire when attached with addEventListener
https://bugs.webkit.org/show_bug.cgi?id=7790
Summary
ondblclick doesn't fire when attached with addEventListener
Beau Hartshorne
Reported
2006-03-15 17:17:03 PST
ondblclick doesn't fire when attached with addEventListener.
Attachments
testcase
(946 bytes, text/html)
2006-03-15 17:17 PST
,
Beau Hartshorne
no flags
Details
Fixes addEventListener("dblclick"...
(21.59 KB, patch)
2006-03-15 21:58 PST
,
Eric Seidel (no email)
mjs
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Beau Hartshorne
Comment 1
2006-03-15 17:17:25 PST
Created
attachment 7097
[details]
testcase
Eric Seidel (no email)
Comment 2
2006-03-15 20:07:19 PST
Bah. It turns out that internally we use khtmlDblclick. Likely for some historical reason. That's just wrong, so I'll fix it. But a work-around for site authors would be to use: elem.addEventListener('khtmlDblclick', handler, false); instead. Or just set the elm.dblclick property directly.
Eric Seidel (no email)
Comment 3
2006-03-15 21:58:43 PST
Created
attachment 7104
[details]
Fixes addEventListener("dblclick"...
Eric Seidel (no email)
Comment 4
2006-03-15 22:12:08 PST
Thanks for the bug, and the great test case!
Eric Seidel (no email)
Comment 5
2006-03-16 23:57:39 PST
Looking at the code for the Safari 2.0.3 release branch, it looks like it's not possible there. It was explicitly disallowed for whatever reason. khtmlDblclick worked on all nighties prior to this fix.
Eric Seidel (no email)
Comment 6
2006-06-13 09:43:35 PDT
To restate: khtmlDblClick is *not* a valid workarond for 1.3 or 2.0. The only trick I know of working is using a timer to measure the time between two consecutive mouse clicks - if time < 300ms and the target is the same in both cases, I trigger a "virtual" dbl-click. (thanks to Jorge Biaggini for that tip)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug