When .bind('unload') was called it accidentally went recursive, from 1bac61655b6c323a...
authorjeresig <jeresig@gmail.com>
Thu, 31 Dec 2009 05:49:53 +0000 (00:49 -0500)
committerjeresig <jeresig@gmail.com>
Thu, 31 Dec 2009 05:49:53 +0000 (00:49 -0500)
src/event.js

index 79a6b95..0bf7d90 100644 (file)
@@ -778,9 +778,11 @@ jQuery.each(["bind", "one"], function( i, name ) {
                        jQuery( this ).unbind( event, handler );
                        return fn.apply( this, arguments );
                }) : fn;
-               return type === "unload" ? this.one(type, data, handler, thisObject) : this.each(function() {
-                       jQuery.event.add( this, type, handler, data );
-               });
+               return type === "unload" && name !== "one" ?
+                       this.one( type, data, fn, thisObject ) :
+                       this.each(function() {
+                               jQuery.event.add( this, type, handler, data );
+                       });
        };
 });