Merge pull request #4642 from henrikx/patch-1

Fix ribbon tooltips getting stuck on the screen by setting a small delay before saving attributes in attributeeditor
This commit is contained in:
zadam 2024-02-16 11:02:13 +01:00 committed by GitHub
commit 157f894c9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -200,7 +200,7 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {
this.attributeDetailWidget.hide(); this.attributeDetailWidget.hide();
}); });
this.$editor.on('blur', () => this.save()); this.$editor.on('blur', () => setTimeout(() => this.save(), 100)); // Timeout to fix https://github.com/zadam/trilium/issues/4160
this.$addNewAttributeButton = this.$widget.find('.add-new-attribute-button'); this.$addNewAttributeButton = this.$widget.find('.add-new-attribute-button');
this.$addNewAttributeButton.on('click', e => this.addNewAttribute(e)); this.$addNewAttributeButton.on('click', e => this.addNewAttribute(e));