Skip to content

Commit 809f29e

Browse files
committed
All: Remove uses of jQuery.proxy()
Ref #15160 Closes gh-1813
1 parent 0940cb9 commit 809f29e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

demos/autocomplete/combobox.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
.autocomplete({
4949
delay: 0,
5050
minLength: 0,
51-
source: $.proxy( this, "_source" )
51+
source: this._source.bind( this )
5252
})
5353
.tooltip({
5454
classes: {

ui/widgets/autocomplete.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ $.widget( "ui.autocomplete", {
447447
_response: function() {
448448
var index = ++this.requestIndex;
449449

450-
return $.proxy( function( content ) {
450+
return function( content ) {
451451
if ( index === this.requestIndex ) {
452452
this.__response( content );
453453
}
@@ -456,7 +456,7 @@ $.widget( "ui.autocomplete", {
456456
if ( !this.pending ) {
457457
this._removeClass( "ui-autocomplete-loading" );
458458
}
459-
}, this );
459+
}.bind( this );
460460
},
461461

462462
__response: function( content ) {

0 commit comments

Comments
 (0)