Skip to content

Commit fb22d35

Browse files
committed
Autocomplete: change two uses of setTimeout to call this._delay
1 parent 7a6ce7e commit fb22d35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/widgets/autocomplete.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ $.widget( "ui.autocomplete", {
270270
if ( label && String.prototype.trim.call( label ).length ) {
271271
clearTimeout( this.liveRegionTimer );
272272
var that = this;
273-
this.liveRegionTimer = setTimeout( function() {
273+
this.liveRegionTimer = this._delay( function() {
274274
that.liveRegion.html( $( "<div>" ).text( label ) );
275275
}, 100 );
276276
}
@@ -669,7 +669,7 @@ $.widget( "ui.autocomplete", $.ui.autocomplete, {
669669
}
670670
clearTimeout( this.liveRegionTimer );
671671
var that = this;
672-
this.liveRegionTimer = setTimeout( function() {
672+
this.liveRegionTimer = this._delay( function() {
673673
that.liveRegion.html( $( "<div>" ).text( message ) );
674674
}, 100 );
675675
}

0 commit comments

Comments
 (0)