mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Menu: Added close on click outside using technique from popup
This commit is contained in:
parent
163d867a1f
commit
9f5050ee06
8
ui/jquery.ui.menu.js
vendored
8
ui/jquery.ui.menu.js
vendored
@ -170,6 +170,14 @@ $.widget( "ui.menu", {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this._bind( document, {
|
||||
click: function( event ) {
|
||||
if ( !$( event.target ).closest( ".ui-menu" ).length ) {
|
||||
this.closeAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_destroy: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user