From: Scott González Date: Wed, 24 Mar 2010 14:15:30 +0000 (-0700) Subject: Menu: Ignore clicks that don't occur on the anchor tag within a valid menu item. X-Git-Tag: 1.8.1~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f2873b6ebf427edd013eaef37adf5cbd4c06a1cf;p=jquery-ui.git Menu: Ignore clicks that don't occur on the anchor tag within a valid menu item. Fixes #5376 - Menu plugin fires select when border is clicked. --- diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index fab7a6287..83a8cf7a4 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -335,7 +335,7 @@ $.widget("ui.menu", { "aria-activedescendant": "ui-active-menuitem" }) .click(function( event ) { - if ( !$( event.target ).closest( ".ui-menu-item" ).length ) { + if ( !$( event.target ).closest( ".ui-menu-item a" ).length ) { return; } // temporary