aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/menu/menu_events.js
diff options
context:
space:
mode:
authorTJ VanToll <tj.vantoll@gmail.com>2013-08-02 06:51:04 -0400
committerTJ VanToll <tj.vantoll@gmail.com>2013-08-03 17:43:30 -0400
commit484e382259f1c1c56b151a97ddf8a894f94d17ea (patch)
tree298d068f09a8a239ed2d2a092a11ad6165970263 /tests/unit/menu/menu_events.js
parenta3770884ac997169b810b3f6fda6df54a9cbbeeb (diff)
downloadjquery-ui-484e382259f1c1c56b151a97ddf8a894f94d17ea.tar.gz
jquery-ui-484e382259f1c1c56b151a97ddf8a894f94d17ea.zip
Menu: Only set the mouseHandled flag if the event is going to bubble. Fixes #9469: on( "menuselect" )
not firing every time.
Diffstat (limited to 'tests/unit/menu/menu_events.js')
-rw-r--r--tests/unit/menu/menu_events.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unit/menu/menu_events.js b/tests/unit/menu/menu_events.js
index 554c4c516..4b152dcf4 100644
--- a/tests/unit/menu/menu_events.js
+++ b/tests/unit/menu/menu_events.js
@@ -619,4 +619,19 @@ test( "ensure default is prevented when clicking on anchors in disabled menus ",
equal( logOutput(), "click,1,afterclick,disable,enable,3", "Click order not valid." );
});
+test( "#9469: Stopping propagation in a select event should not suppress subsequent select events.", function() {
+ expect( 1 );
+ var element = $( "#menu1" ).menu({
+ select: function( event, ui ) {
+ log();
+ event.stopPropagation();
+ }
+ });
+
+ click( element, "1" );
+ click( element, "2" );
+
+ equal( logOutput(), "1,2", "Both select events were not triggered." );
+});
+
})( jQuery );