mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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:
parent
470030249c
commit
fc6d6e138c
4
ui/jquery.ui.autocomplete.js
vendored
4
ui/jquery.ui.autocomplete.js
vendored
@ -268,7 +268,9 @@ $.widget( "ui.autocomplete", {
|
|||||||
url: url,
|
url: url,
|
||||||
data: request,
|
data: request,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
autocompleteRequest: ++requestIndex,
|
context: {
|
||||||
|
autocompleteRequest: ++requestIndex
|
||||||
|
},
|
||||||
success: function( data, status ) {
|
success: function( data, status ) {
|
||||||
if ( this.autocompleteRequest === requestIndex ) {
|
if ( this.autocompleteRequest === requestIndex ) {
|
||||||
response( data );
|
response( data );
|
||||||
|
Loading…
Reference in New Issue
Block a user