event = $.Event( "keydown" );
event.keyCode = $.ui.keyCode.DOWN;
element.trigger( event );
- deepEqual( menu.find( ".ui-menu-item:has(.ui-state-focus)" ).length, 1, "menu item is active" );
+ equal( menu.find( ".ui-menu-item.ui-state-focus" ).length, 1, "menu item is active" );
event = $.Event( "keydown" );
event.keyCode = $.ui.keyCode.ENTER;
open: function() {
equal(
element.autocomplete( "widget" )
- .children( ".ui-menu-item:first" )
- .find( ".ui-state-focus" )
+ .children( ".ui-menu-item.ui-state-focus" )
.length,
focusedLength,
"first item is " + (afValue ? "" : "not") + " auto focused" );