aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets/menu.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2017-04-18 17:37:15 -0400
committerScott González <scott.gonzalez@gmail.com>2017-04-25 06:33:00 -0400
commit0d25a36eecb9e5598596208e4852b3c3fdbf5510 (patch)
tree5879015fc17c92df689de431325ff661a61b247d /ui/widgets/menu.js
parentb3c0a7f71d0b351755b97858ad47de4e9a373606 (diff)
downloadjquery-ui-0d25a36eecb9e5598596208e4852b3c3fdbf5510.tar.gz
jquery-ui-0d25a36eecb9e5598596208e4852b3c3fdbf5510.zip
Menu: Close menus immediately on selection or click outside
Fixes #15034 Closes gh-1807
Diffstat (limited to 'ui/widgets/menu.js')
-rw-r--r--ui/widgets/menu.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/widgets/menu.js b/ui/widgets/menu.js
index 49da26865..19d9b90df 100644
--- a/ui/widgets/menu.js
+++ b/ui/widgets/menu.js
@@ -162,7 +162,7 @@ return $.widget( "ui.menu", {
this._on( this.document, {
click: function( event ) {
if ( this._closeOnDocumentClick( event ) ) {
- this.collapseAll( event );
+ this.collapseAll( event, true );
}
// Reset the mouseHandled flag
@@ -502,7 +502,7 @@ return $.widget( "ui.menu", {
this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" );
this.activeMenu = currentMenu;
- }, this.delay );
+ }, all ? 0 : this.delay );
},
// With no arguments, closes the currently active menu - if nothing is active