Skip to content

Commit

Permalink
Autocomplete: change two uses of setTimeout to call this._delay
Browse files Browse the repository at this point in the history
  • Loading branch information
bbenjamin committed Dec 15, 2021
1 parent 7a6ce7e commit fb22d35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/widgets/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ $.widget( "ui.autocomplete", {
if ( label && String.prototype.trim.call( label ).length ) {
clearTimeout( this.liveRegionTimer );
var that = this;
this.liveRegionTimer = setTimeout( function() {
this.liveRegionTimer = this._delay( function() {
that.liveRegion.html( $( "<div>" ).text( label ) );
}, 100 );
}
Expand Down Expand Up @@ -669,7 +669,7 @@ $.widget( "ui.autocomplete", $.ui.autocomplete, {
}
clearTimeout( this.liveRegionTimer );
var that = this;
this.liveRegionTimer = setTimeout( function() {
this.liveRegionTimer = this._delay( function() {
that.liveRegion.html( $( "<div>" ).text( message ) );
}, 100 );
}
Expand Down

0 comments on commit fb22d35

Please sign in to comment.