]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete tests: Fixed handling of cached ajax requests in IE.
authorScott González <scott.gonzalez@gmail.com>
Wed, 3 Aug 2011 20:12:46 +0000 (16:12 -0400)
committerScott González <scott.gonzalez@gmail.com>
Wed, 3 Aug 2011 20:13:03 +0000 (16:13 -0400)
tests/unit/autocomplete/autocomplete_options.js

index 01c4e9fef2dff4c0bb9102bd1648c183613479f5..8d11aa3999217a0cf8683257ad92d03c64794acd 100644 (file)
@@ -117,7 +117,6 @@ function sourceTest( source, async ) {
                        source: source
                }),
                menu = element.autocomplete( "widget" );
-       element.val( "ja" ).autocomplete( "search" );
        function result() {
                equal( menu.find( ".ui-menu-item" ).text(), "javajavascript" );
                element.autocomplete( "destroy" );
@@ -128,7 +127,9 @@ function sourceTest( source, async ) {
        if ( async ) {
                stop();
                $( document ).one( "ajaxStop", result );
-       } else {
+       }
+       element.val( "ja" ).autocomplete( "search" );
+       if ( !async ) {
                result();
        }
 }