Skip to content

Commit

Permalink
Menu: Don't trigger select if a click occurs outside of a menu item.
Browse files Browse the repository at this point in the history
Fixes #5376 - Menu plugin fires select when border is clicked.
  • Loading branch information
scottgonzalez committed Mar 20, 2010
1 parent e70743c commit c61bd8e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ui/jquery.ui.autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c61bd8e

Please sign in to comment.