]> source.dussan.org Git - jquery-ui.git/commitdiff
Menu: Fix issue with missing active item when clicking a menu item more than once
authorkborchers <kris.borchers@gmail.com>
Fri, 13 Jul 2012 04:01:13 +0000 (23:01 -0500)
committerkborchers <kris.borchers@gmail.com>
Fri, 13 Jul 2012 04:01:13 +0000 (23:01 -0500)
ui/jquery.ui.menu.js

index e8b8ed1fcbd9762f0585caa837bfabec9bcb1a9d..be04fff1cba0b9205ecc2c1dbf0484c646fb7dec 100644 (file)
@@ -583,7 +583,8 @@ $.widget( "ui.menu", {
        select: function( event ) {
                // Save active reference before collapseAll triggers blur
                var ui = {
-                       item: this.active
+                       // Selecting a menu item removes the active item causing multiple clicks to be missing an item
+                       item: this.active || $( event.target ).closest( ".ui-menu-item" )
                };
                this.collapseAll( event, true );
                this._trigger( "select", event, ui );