aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui/jquery.ui.autocomplete.js
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/js/ui/jquery.ui.autocomplete.js')
-rw-r--r--themes/default/js/ui/jquery.ui.autocomplete.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/themes/default/js/ui/jquery.ui.autocomplete.js b/themes/default/js/ui/jquery.ui.autocomplete.js
index 576feee66..718bfe5b9 100644
--- a/themes/default/js/ui/jquery.ui.autocomplete.js
+++ b/themes/default/js/ui/jquery.ui.autocomplete.js
@@ -1,5 +1,5 @@
/*
- * jQuery UI Autocomplete 1.8.9
+ * jQuery UI Autocomplete 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -14,6 +14,9 @@
*/
(function( $, undefined ) {
+// used to prevent race conditions with remote data sources
+var requestIndex = 0;
+
$.widget( "ui.autocomplete", {
options: {
appendTo: "body",
@@ -256,17 +259,16 @@ $.widget( "ui.autocomplete", {
url: url,
data: request,
dataType: "json",
- success: function( data, status, xhr ) {
- if ( xhr === self.xhr ) {
+ autocompleteRequest: ++requestIndex,
+ success: function( data, status ) {
+ if ( this.autocompleteRequest === requestIndex ) {
response( data );
}
- self.xhr = null;
},
- error: function( xhr ) {
- if ( xhr === self.xhr ) {
+ error: function() {
+ if ( this.autocompleteRequest === requestIndex ) {
response( [] );
}
- self.xhr = null;
}
});
};