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
fixes overwriting attributes after clicking on a relation in the attribute editor, closes #3090
zadam35fab7a23c39
diff --git a/src/public/app/widgets/attribute_widgets/attribute_editor.js b/src/public/app/widgets/attribute_widgets/attribute_editor.jsindex bbc27fe4f0..84fba78b1b 100644--- a/src/public/app/widgets/attribute_widgets/attribute_editor.js+++ b/src/public/app/widgets/attribute_widgets/attribute_editor.js@@ -297,6 +297,12 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {}async save() {+ if (this.lastUpdatedNoteId !== this.noteId) {+ // https://github.com/zadam/trilium/issues/3090+ console.warn("Ignoring blur event because a different note is loaded.");+ return;+ }+const attributes = this.parseAttributes();if (attributes) {@@ -354,6 +360,8 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {}dataChanged() {+ this.lastUpdatedNoteId = this.noteId;+if (this.lastSavedContent === this.textEditor.getData()) {this.$saveAttributesButton.fadeOut();}