aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/jquery.ui.menu.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js
index b93c95531..770e0252a 100644
--- a/ui/jquery.ui.menu.js
+++ b/ui/jquery.ui.menu.js
@@ -170,6 +170,14 @@ $.widget( "ui.menu", {
}
}
});
+
+ this._bind( document, {
+ click: function( event ) {
+ if ( !$( event.target ).closest( ".ui-menu" ).length ) {
+ this.closeAll();
+ }
+ }
+ });
},
_destroy: function() {