Skip to content

Commit ac971a6

Browse files
committed
Widget: Avoid tracking remove event handlers for classes options
Fixes #15082 Fixes #15095
1 parent a2b25ef commit ac971a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ui/widget.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,9 @@ $.Widget.prototype = {
514514
}
515515
}
516516

517-
this._on( options.element, {
518-
"remove": "_untrackClassesElement"
519-
} );
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" ) );
520520

521521
if ( options.keys ) {
522522
processClassString( options.keys.match( /\S+/g ) || [], true );

0 commit comments

Comments
 (0)