mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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:
parent
e70743cdcb
commit
c61bd8ec67
3
ui/jquery.ui.autocomplete.js
vendored
3
ui/jquery.ui.autocomplete.js
vendored
@ -335,6 +335,9 @@ $.widget("ui.menu", {
|
|||||||
"aria-activedescendant": "ui-active-menuitem"
|
"aria-activedescendant": "ui-active-menuitem"
|
||||||
})
|
})
|
||||||
.click(function(e) {
|
.click(function(e) {
|
||||||
|
if ( !$( e.target ).closest( ".ui-menu-item" ).length ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// temporary
|
// temporary
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
self.select();
|
self.select();
|
||||||
|
Loading…
Reference in New Issue
Block a user