We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac971a6 commit 979e468Copy full SHA for 979e468
ui/widget.js
@@ -514,9 +514,9 @@ $.Widget.prototype = {
514
}
515
516
517
- // Don't use ._on() because we want to avoid additional processing for
518
- // tracking the event bindings.
519
- options.element.one( "remove", $.proxy( this, "_untrackClassesElement" ) );
+ this._on( options.element, {
+ remove: "_untrackClassesElement"
+ } );
520
521
if ( options.keys ) {
522
processClassString( options.keys.match( /\S+/g ) || [], true );
@@ -535,6 +535,8 @@ $.Widget.prototype = {
535
that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
536
537
} );
538
+
539
+ this._off( event.target );
540
},
541
542
_removeClass: function( element, keys, extra ) {
0 commit comments