fix: click outside to close

This commit is contained in:
sokumon 2025-03-25 02:27:01 +05:30
parent 3e70f542fa
commit ea50c4b0d0

View file

@ -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();
}