Fix generic event handler and $events expando removal for IE
This commit is contained in:
parent
9791855ea9
commit
fe1910d4d9
|
@ -75,21 +75,21 @@ jQuery.event = {
|
||||||
|
|
||||||
// remove all handlers for the given type
|
// remove all handlers for the given type
|
||||||
else
|
else
|
||||||
for ( handler in events[type] )
|
for ( handler in element.$events[type] )
|
||||||
delete events[type][handler];
|
delete events[type][handler];
|
||||||
|
|
||||||
// remove generic event handler if no more handlers exist
|
// remove generic event handler if no more handlers exist
|
||||||
for ( ret in events[type] ) break;
|
for ( ret in events[type] ) break;
|
||||||
if ( !ret ) {
|
if ( !ret ) {
|
||||||
ret = element["on" + type] = undefined;
|
ret = element["on" + type] = null;
|
||||||
delete events[type];
|
delete element.$events[type];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the expando if it's no longer used
|
// Remove the expando if it's no longer used
|
||||||
for ( ret in events ) break;
|
for ( ret in events ) break;
|
||||||
if ( !ret )
|
if ( !ret )
|
||||||
delete element.$events;
|
element.$events = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue