From 041cb39a6667e3637a40fad6ef952da476f2af97 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Sat, 11 Feb 2012 08:15:24 -0500 Subject: [PATCH] Autocomplete: Set context for ajax requests instead of relying on default context. Fixes #7490 - Autocomplete fails when context option is set with ajaxSetup. --- ui/jquery.ui.autocomplete.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index c054ba2dd..14e8a2a86 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -316,7 +316,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 ); -- 2.39.5