Bind multiple data to same handler
Hi,
I found a bug[1] when you want to bind multiple data to the same
handler. I think it should be fired for every bind, and not only once
with the last data binded as it is at the moment.
The issue isn't that trivial, thus I come also up with it on the dev
list. I'm not completely convinced with my patch I think it can be
impreoved. Additionally I've only the test suite with FF2 and FF3beta,
it would be nice if someone could run the (patched) suite also with
other browsers.
A small explantion for the patch. I store for every event handler that
was already bound a reference to the new handler (and back). If it is
bound again, the new handler and it's referenced is added in between, so
there's always a cyclic reference between all the handler. This ensures
that all events are catched when they are unbound.
Cheers,
Volker
[1] http://dev.jquery.com/ticket/3076