diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2011-02-24 12:05:20 +0100 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2011-02-24 12:05:20 +0100 |
commit | 38cfcfffe92f2ac2572ab7ebc51e860de9312baf (patch) | |
tree | 8c03b1d8881627a041c1d20f134351b300f970da /tests | |
parent | 5c687be331d3110ece3b2417c021485950f87ff9 (diff) | |
download | jquery-ui-38cfcfffe92f2ac2572ab7ebc51e860de9312baf.tar.gz jquery-ui-38cfcfffe92f2ac2572ab7ebc51e860de9312baf.zip |
Menu: Update autocomplete to use deactivate and check for focus class
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/autocomplete/autocomplete_core.js | 2 | ||||
-rw-r--r-- | tests/visual/menu/menu.html | 21 |
2 files changed, 20 insertions, 3 deletions
diff --git a/tests/unit/autocomplete/autocomplete_core.js b/tests/unit/autocomplete/autocomplete_core.js index fcd835d1a..2edb8876c 100644 --- a/tests/unit/autocomplete/autocomplete_core.js +++ b/tests/unit/autocomplete/autocomplete_core.js @@ -49,7 +49,7 @@ test( "prevent form submit on enter when menu is active", function() { event = $.Event( "keydown" ); event.keyCode = $.ui.keyCode.DOWN; ac.trigger( event ); - same( $( ".ui-menu-item:has(.ui-state-hover)" ).length, 1, "menu item is active" ); + same( $( ".ui-menu-item:has(.ui-state-focus)" ).length, 1, "menu item is active" ); event = $.Event( "keydown" ); event.keyCode = $.ui.keyCode.ENTER; diff --git a/tests/visual/menu/menu.html b/tests/visual/menu/menu.html index 395a06bdf..32fb98ea8 100644 --- a/tests/visual/menu/menu.html +++ b/tests/visual/menu/menu.html @@ -24,7 +24,7 @@ }); } - var menus = $("#menu1, #menu2"); + var menus = $("#menu1, #menu2, #menu3"); create(); $("#toggle-destroy").toggle(function() { @@ -55,7 +55,24 @@ <li><a href="#">Salzburg</a></li> </ul> -<ul id="menu2"> +<ul id="menu1"> + <li><a href="#">Aberdeen</a></li> + <li><a href="#">Ada</a></li> + <li><a href="#">Adamsville</a></li> + <li><a href="#">Addyston</a></li> + <li> + <a href="#">Delphi</a> + <ul> + <li><a href="#">Ada</a></li> + <li><a href="#">Saarland</a></li> + <li><a href="#">Salzburg</a></li> + </ul> + </li> + <li><a href="#">Saarland</a></li> + <li><a href="#">Salzburg</a></li> +</ul> + +<ul id="menu3"> <li><a href="#">Aberdeen</a></li> <li><a href="#">Ada</a></li> <li><a href="#">Adamsville</a></li> |