Menu: Don't trigger select if a click occurs outside of a menu item.

Fixes #5376 - Menu plugin fires select when border is clicked.
This commit is contained in:
Scott González 2010-03-20 15:09:46 -04:00
parent e70743cdcb
commit c61bd8ec67

View File

@ -335,6 +335,9 @@ $.widget("ui.menu", {
"aria-activedescendant": "ui-active-menuitem"
})
.click(function(e) {
if ( !$( e.target ).closest( ".ui-menu-item" ).length ) {
return;
}
// temporary
e.preventDefault();
self.select();