aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.autocomplete.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-03-20 15:09:46 -0400
committerScott González <scott.gonzalez@gmail.com>2010-03-20 15:09:46 -0400
commitc61bd8ec67d9a863a00ae9d188993680f83186b0 (patch)
treed35896b5ce4d4698f7bada8601f06eb7f646af14 /ui/jquery.ui.autocomplete.js
parente70743cdcb5cc4c87f123d48278e78d67865865f (diff)
downloadjquery-ui-c61bd8ec67d9a863a00ae9d188993680f83186b0.tar.gz
jquery-ui-c61bd8ec67d9a863a00ae9d188993680f83186b0.zip
Menu: Don't trigger select if a click occurs outside of a menu item.
Fixes #5376 - Menu plugin fires select when border is clicked.
Diffstat (limited to 'ui/jquery.ui.autocomplete.js')
-rw-r--r--ui/jquery.ui.autocomplete.js3
1 files changed, 3 insertions, 0 deletions
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();