]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete tests: Fix #7788, incorrect selector in autoFocus test. 497/head
authorDave Methvin <dave.methvin@gmail.com>
Thu, 13 Oct 2011 17:18:30 +0000 (13:18 -0400)
committerDave Methvin <dave.methvin@gmail.com>
Thu, 13 Oct 2011 17:18:30 +0000 (13:18 -0400)
jQuery 1.7 fixed a bug with positional selectors that exposed the incorrect use of `.children()` here.

tests/unit/autocomplete/autocomplete_options.js

index 8d11aa3999217a0cf8683257ad92d03c64794acd..114e9a42ba726c974a388b64f0b4783fb649c8ef 100644 (file)
@@ -34,7 +34,7 @@ function autoFocusTest( afValue, focusedLength ) {
                delay: 0,
                source: data,
                open: function( event, ui ) {
-                       equal( element.autocomplete( "widget" ).children( ".ui-menu-item:first .ui-state-focus" ).length,
+                       equal( element.autocomplete( "widget" ).children( ".ui-menu-item:first" ).find( ".ui-state-focus" ).length,
                                focusedLength, "first item is " + (afValue ? "" : "not") + " auto focused" );
                        start();
                }