Skip to content

Commit

Permalink
Autocomplete: Set context for ajax requests instead of relying on def…
Browse files Browse the repository at this point in the history
…ault context. Fixes #7490 - Autocomplete fails when context option is set with ajaxSetup.

(cherry picked from commit 041cb39)
  • Loading branch information
scottgonzalez committed Feb 11, 2012
1 parent 4700302 commit fc6d6e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/jquery.ui.autocomplete.js
Expand Up @@ -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 );
Expand Down

0 comments on commit fc6d6e1

Please sign in to comment.