We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
._off()
1 parent cedf91c commit b397294Copy full SHA for b397294
ui/widget.js
@@ -442,8 +442,14 @@ $.Widget.prototype = {
442
},
443
444
_off: function( element, eventName ) {
445
- eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
+ eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) +
446
+ this.eventNamespace;
447
element.unbind( eventName ).undelegate( eventName );
448
+
449
+ // Clear the stack to avoid memory leaks (#10056)
450
+ this.bindings = $( this.bindings.not( element ).get() );
451
+ this.focusable = $( this.focusable.not( element ).get() );
452
+ this.hoverable = $( this.hoverable.not( element ).get() );
453
454
455
_delay: function( handler, delay ) {
0 commit comments