From c61bd8ec67d9a863a00ae9d188993680f83186b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Sat, 20 Mar 2010 15:09:46 -0400 Subject: [PATCH] Menu: Don't trigger select if a click occurs outside of a menu item. Fixes #5376 - Menu plugin fires select when border is clicked. --- ui/jquery.ui.autocomplete.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 60ba69f89..021b330a6 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -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(); -- 2.39.5