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
fix(client): drop down no longer hiding when it should
Elian Dorana28dff7525e8
diff --git a/src/public/app/menus/context_menu.ts b/src/public/app/menus/context_menu.tsindex e765728e77..b5c53beafa 100644--- a/src/public/app/menus/context_menu.ts+++ b/src/public/app/menus/context_menu.ts@@ -46,9 +46,9 @@ class ContextMenu {this.isMobile = utils.isMobile();if (this.isMobile) {- this.$cover.on("click", this.hide);+ this.$cover.on("click", () => this.hide());} else {- $(document).on('click', (e) => this.hide);+ $(document).on('click', (e) => this.hide());}}@@ -218,7 +218,6 @@ class ContextMenu {// this date checking comes from change in FF66 - https://github.com/zadam/trilium/issues/468// "contextmenu" event also triggers "click" event which depending on the timing can close the just opened context menu// we might filter out right clicks, but then it's better if even right clicks close the context menu- console.warn(new Error());if (Date.now() - this.dateContextMenuOpenedMs > 300) {// seems like if we hide the menu immediately, some clicks can get propagated to the underlying component// see https://github.com/zadam/trilium/pull/3805 for details