Example of breakage from capturing listeners not firing on target:

In Safari we have changed since the last shipping version to no  
longer fire useCapture = true event listeners on the target.

One site that breaks is MapQuest:

http://bugzilla.opendarwin.org/show_bug.cgi?id=7205

I am sure others will be broken.

Almost all the breakage seems to stem from an addEvent function  
that's floating around. It uses attachEvent in IE but  
addEventListener with useCapture = true on DOM Events browsers, which  
seems very wrong. In this particular instance, there is an Opera  
workaround, but I think the Opera code path would actually also work  
in Safari and Mozilla.

Should we start tracking down the source of this script and sites  
that use it, or back down and change the DOM events spec so that  
capturing listeners fire on the target?

I actually think the latter behavior is better since we've seen (in  
the focus event discussion) numerous complaints that using capture  
usually requires registering two listeners, and we've seen no obvious  
use cases where not firing on the target was helpful.

Regards,
Maciej

Received on Thursday, 30 March 2006 00:18:00 UTC