fix: click outside to close
This commit is contained in:
parent
3e70f542fa
commit
ea50c4b0d0
1 changed files with 5 additions and 0 deletions
|
|
@ -48,9 +48,14 @@ frappe.ui.Sidebar = class Sidebar {
|
|||
this.$sidebar = this.wrapper.find(".sidebar-items");
|
||||
|
||||
this.wrapper.find(".body-sidebar .collapse-sidebar-link").on("click", () => {
|
||||
if (frappe.is_mobile()) this.apps_switcher.app_switcher_menu.toggleClass("hidden");
|
||||
this.toggle_sidebar();
|
||||
});
|
||||
|
||||
this.wrapper.find(".overlay").on("click", () => {
|
||||
this.close_sidebar();
|
||||
});
|
||||
|
||||
this.apps_switcher = new frappe.ui.AppsSwitcher(this);
|
||||
this.apps_switcher.create_app_data_map();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue