Skip to content

Commit 6867e0b

Browse files
committed
Autocomplete tests: Fixed handling of cached ajax requests in IE.
1 parent d912c30 commit 6867e0b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/unit/autocomplete/autocomplete_options.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ function sourceTest( source, async ) {
117117
source: source
118118
}),
119119
menu = element.autocomplete( "widget" );
120-
element.val( "ja" ).autocomplete( "search" );
121120
function result() {
122121
equal( menu.find( ".ui-menu-item" ).text(), "javajavascript" );
123122
element.autocomplete( "destroy" );
@@ -128,7 +127,9 @@ function sourceTest( source, async ) {
128127
if ( async ) {
129128
stop();
130129
$( document ).one( "ajaxStop", result );
131-
} else {
130+
}
131+
element.val( "ja" ).autocomplete( "search" );
132+
if ( !async ) {
132133
result();
133134
}
134135
}

0 commit comments

Comments
 (0)