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
Hide the content menu on mouse up
SiriusXT2436838aae6f
diff --git a/apps/client/src/menus/context_menu.ts b/apps/client/src/menus/context_menu.tsindex ebcdaae91c..7d0bc0a2ff 100644--- a/apps/client/src/menus/context_menu.ts+++ b/apps/client/src/menus/context_menu.ts@@ -192,6 +192,12 @@ class ContextMenu {// it's important to stop the propagation especially for sub-menus, otherwise the event// might be handled again by top-level menureturn false;+ })+ .on("mouseup", (e) =>{+ e.stopPropagation();+ // Hide the content menu on mouse up to prevent the mouse event from propagating to the elements below.+ this.hide();+ return false;});if ("enabled" in item && item.enabled !== undefined && !item.enabled) {