Autocomplete: Set context for ajax requests instead of relying on default context. Fixes #7490 - Autocomplete fails when context option is set with ajaxSetup.

(cherry picked from commit 041cb39a66)
This commit is contained in:
Scott González 2012-02-11 08:15:24 -05:00
parent 470030249c
commit fc6d6e138c

View File

@ -268,7 +268,9 @@ $.widget( "ui.autocomplete", {
url: url,
data: request,
dataType: "json",
autocompleteRequest: ++requestIndex,
context: {
autocompleteRequest: ++requestIndex
},
success: function( data, status ) {
if ( this.autocompleteRequest === requestIndex ) {
response( data );