Permalink
Browse files

Widget: modify _bind method

  • Loading branch information...
1 parent c6fc850 commit e2989fa9632940543c2a1a4faf26837e0d45dc63 @Y-Kamata committed Nov 2, 2011
Showing with 7 additions and 6 deletions.
  1. +7 −6 ui/jquery.ui.widget.js
View
13 ui/jquery.ui.widget.js
@@ -322,13 +322,13 @@ $.Widget.prototype = {
$( this ).hasClass( "ui-state-disabled" ) ) {
return;
}
- //return ( typeof handler === "string" ? instance[ handler ] : handler )
- // .apply( instance, arguments );
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
+ .apply( instance, arguments );
// bugfix memory leak http://bugs.jqueryui.com/ticket/7808
- var ret = ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- instance = null;
- return ret;
+ //var ret = ( typeof handler === "string" ? instance[ handler ] : handler )
+ // .apply( instance, arguments );
+ //instance = null;
+ //return ret;
}
var match = event.match( /^(\w+)\s*(.*)$/ ),
eventName = match[1] + "." + instance.widgetName,
@@ -339,6 +339,7 @@ $.Widget.prototype = {
element.bind( eventName, handlerProxy );
}
// bugfix memory leak http://bugs.jqueryui.com/ticket/7808
+ instance = null;
element = null;
});
},

0 comments on commit e2989fa

Please sign in to comment.