fix: update click handler to prevent menu closure when clicking inside the menu-bar

This commit is contained in:
2026-05-31 00:43:28 +05:30
parent 36a6d72586
commit f1de42f897
+7 -1
View File
@@ -1196,7 +1196,13 @@
});
document.addEventListener("click", (e) => {
if (e.target.closest("#menu-bar")) closeAll();
// If the click is inside the menu-bar, do not close all
if (e.target.closest("#menu-bar")) return;
// If any menu-item or dropdown is open, close all
if (document.querySelectorAll('.menu-item.active, .dropdown.open').length > 0) {
closeAll();
}
});
// -- Global Keyboard Shortcuts