Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
Revert "fix: close context menu when clicking items with submenus"
Elian Doran61ec341c27a8
diff --git a/apps/client/src/menus/context_menu.ts b/apps/client/src/menus/context_menu.tsindex ef477c5764..4411db9dcc 100644--- a/apps/client/src/menus/context_menu.ts+++ b/apps/client/src/menus/context_menu.ts@@ -62,7 +62,7 @@ class ContextMenu {if (this.isMobile) {this.$cover.on("click", () => this.hide());} else {- $(document).on("mouseup", (e) => this.hide());+ $(document).on("click", (e) => this.hide());}}@@ -225,10 +225,9 @@ class ContextMenu {$item.on("mouseup", (e) => {// Prevent submenu from failing to expand on mobileif (!this.isMobile || !("items" in item && item.items)) {+ e.stopPropagation();// Hide the content menu on mouse up to prevent the mouse event from propagating to the elements below.- if (("command" in item) || ("handler" in item)) {- this.hide();- }+ this.hide();return false;}});