mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
Menu: Added close on click outside using technique from popup
This commit is contained in:
committed by
Jörn Zaefferer
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() {
|
||||
|
||||
Reference in New Issue
Block a user