Ticket #5779 (closed bug: fixed)
Bad behavior on .bind() with multiple events if one of them is special
|Reported by:||jarrowwx||Owned by:||brandon|
When you call bind with a space separated list of events, it loops through them as a shortcut for multiple calls to bind.
Unfortunately, if you call bind with a call to a special event, the code replaces the passed in handler with the one that is generated by the special event handler. This means that any other events in the list yet to be processed are altered in the process.
If the code were to differentiate between the original handler and the 'active' handler, and set the 'active' handler back to the original at the top of the loop, this problem would be solved.
Admittedly, it is an edge case, but the behavior is most definitely not what it should be. I've left the priority at the default value.
For more notes, see the thread in jquery-dev: "jQuery.event.special\['type'\].add modifies handler of other types"