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 immediately closed attribute detail after clicking e.g. "add label"
zadam311b98ffcb64
diff --git a/src/public/app/services/context_menu.js b/src/public/app/services/context_menu.jsindex f1ee8fd480..acbb3a3e4b 100644--- a/src/public/app/services/context_menu.js+++ b/src/public/app/services/context_menu.js@@ -97,7 +97,7 @@ class ContextMenu {.append($link)// important to use mousedown instead of click since the former does not change focus// (especially important for focused text for spell check)- .on('mousedown', (e) => {+ .on('mousedown', e => {e.stopPropagation();this.hide();diff --git a/src/public/app/widgets/attribute_widgets/attribute_detail.js b/src/public/app/widgets/attribute_widgets/attribute_detail.jsindex ea8f68649a..35be1e15b4 100644--- a/src/public/app/widgets/attribute_widgets/attribute_detail.js+++ b/src/public/app/widgets/attribute_widgets/attribute_detail.js@@ -334,7 +334,7 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget {this.$relatedNotesList = this.$relatedNotesContainer.find('.related-notes-list');this.$relatedNotesMoreNotes = this.$relatedNotesContainer.find('.related-notes-more-notes');- $(window).on('mouseup', e => {+ $(window).on('mousedown', e => {if (!$(e.target).closest(this.$widget[0]).length&& !$(e.target).closest(".algolia-autocomplete").length&& !$(e.target).closest("#context-menu-container").length) {