In Safari and Opera the 'dblclick' event can not be attached using addEventListener.
Test page Workaround is included
Reported by: Jorge Biaggini.
Opera, Safari | Reported on 28 June 2006.
This site is no longer maintained. I’m sorry, but it’s just too much work for too little return. You can continue to browse old bug reports, though.
Search reports by browser:
2 Posted by Grey on 27 December 2006 | Permalink
Well, at least on Opera 9.10, this works, although somewhat unreliably in the given test case.
In need for a better test case I changed the test case found at http://www.quirksmode.org/js/events_mouse.html to use addEventListener instead, and Opera spit the events out reliably in the same order:
1. mousedown
2. mouseup
3. click
4. mousedown
5. mouseup
6. click
7. dblclick
To confirm, add this code to the script tag that contains 'logIt':
function wrapIt(e_type){
document.getElementById('useIt').addEventListener(e_type,function(){logIt(e_type)},false);
}
document.addEventListener('DOMContentLoaded',function(){wrapIt('mousedown');wrapIt('mouseup');wrapIt('click');wrapIt('dblclick');},false)
(and make sure you delete the event attributes from and add a id='useIt' to the anchor)
(or create your own test case)
1 Posted by Simon Richardson on 28 June 2006 | Permalink
Tested with Safari 2.0.3 and works well - thank-you