diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-07-25 11:53:14 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-07-25 11:53:14 -0400 |
commit | 19a9de7e668cdb3b76c3b733d0147f1853cb38a5 (patch) | |
tree | a259b421dd77cbec27e55db9b4d1104bf5214a2a /tests/unit/menu | |
parent | daadc343be2f139e82719e2e5ff466aa19ec166f (diff) | |
parent | 51ee3be39829e339c8e4bccb532347944e600ca5 (diff) | |
download | jquery-ui-19a9de7e668cdb3b76c3b733d0147f1853cb38a5.tar.gz jquery-ui-19a9de7e668cdb3b76c3b733d0147f1853cb38a5.zip |
Merge branch 'master' into core-1.6.1
Conflicts:
demos/menubar/default.html
tests/unit/autocomplete/autocomplete.html
tests/visual/effects/effects.all.html
ui/jquery.ui.menu.js
ui/jquery.ui.popup.js
Diffstat (limited to 'tests/unit/menu')
-rw-r--r-- | tests/unit/menu/menu_events.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/unit/menu/menu_events.js b/tests/unit/menu/menu_events.js index a03bec3f6..2f713acf8 100644 --- a/tests/unit/menu/menu_events.js +++ b/tests/unit/menu/menu_events.js @@ -21,4 +21,25 @@ test("handle click on menu", function() { equals( $("#log").html(), "1,3,2,afterclick,1,click,", "Click order not valid."); }); +test( "handle blur: click", function() { + expect( 4 ); + var $menu = $( "#menu1" ).menu({ + focus: function( event, ui ) { + equal( event.originalEvent.type, "click", "focus triggered 'click'" ); + equal( event.type, "menufocus", "focus event.type is 'menufocus'" ); + + }, + blur: function( event, ui ) { + console.log( event, ui ); + equal( event.originalEvent.type, "click", "blur triggered 'click'" ); + equal( event.type, "menublur", "blur event.type is 'menublur'" ); + } + }); + + $menu.find( "li a:first" ).trigger( "click" ); + $( "<a/>", { id: "remove"} ).appendTo("body").trigger( "click" ); + + $("#remove").remove(); +}); + })(jQuery); |