]> source.dussan.org Git - jquery.git/commitdiff
Fix generic event handler and $events expando removal for IE
authorBrandon Aaron <brandon.aaron@gmail.com>
Mon, 5 Mar 2007 17:34:17 +0000 (17:34 +0000)
committerBrandon Aaron <brandon.aaron@gmail.com>
Mon, 5 Mar 2007 17:34:17 +0000 (17:34 +0000)
src/event/event.js

index e276ab6dac0ec925ea5c85e15fc4777a3d0eaf2b..8aedabbc63c7c4dbcb7b371fe737896665dbd2c4 100644 (file)
@@ -75,21 +75,21 @@ jQuery.event = {
                                
                                // remove all handlers for the given type
                                else
-                                       for ( handler in events[type] )
+                                       for ( handler in element.$events[type] )
                                                delete events[type][handler];
 
                                // remove generic event handler if no more handlers exist
                                for ( ret in events[type] ) break;
                                if ( !ret ) {
-                                       ret = element["on" + type] = undefined;
-                                       delete events[type];
+                                       ret = element["on" + type] = null;
+                                       delete element.$events[type];
                                }
                        }
 
                        // Remove the expando if it's no longer used
                        for ( ret in events ) break;
                        if ( !ret )
-                               delete element.$events;
+                               element.$events = null;
                }
        },