]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete: Fixed context for handling async focus in IE; makes change event work...
authorScott González <scott.gonzalez@gmail.com>
Thu, 10 May 2012 16:57:41 +0000 (12:57 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 10 May 2012 16:57:41 +0000 (12:57 -0400)
ui/jquery.ui.autocomplete.js

index a5d832f0a08c3255da79f7ccf55faf78fbef6564..fab9691a34477f5f6f78aee0695880f0eb48f58d 100644 (file)
@@ -247,10 +247,10 @@ $.widget( "ui.autocomplete", {
                                        // #6109 - IE triggers two focus events and the second
                                        // is asynchronous, so we need to reset the previous
                                        // term synchronously and asynchronously :-(
-                                       setTimeout(function() {
+                                       this._delay(function() {
                                                this.previous = previous;
                                                this.selectedItem = item;
-                                       }, 1);
+                                       });
                                }
 
                                if ( false !== this._trigger( "select", event, { item: item } ) ) {