From a97a7cdcddd74ec2a9d2f50eac5583d93810ce73 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 17 Jan 2022 20:54:57 +0100 Subject: [PATCH] fix note title refreshing with old state when user quickly skips to content and starts editing, closes #2566 --- src/public/app/widgets/note_title.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/note_title.js b/src/public/app/widgets/note_title.js index a8d5b5efc..59007faa6 100644 --- a/src/public/app/widgets/note_title.js +++ b/src/public/app/widgets/note_title.js @@ -52,7 +52,11 @@ export default class NoteTitleWidget extends NoteContextAwareWidget { this.$noteTitle.on('input', () => this.spacedUpdate.scheduleUpdate()); - this.$noteTitle.on('blur', () => { this.deleteNoteOnEscape = false }); + this.$noteTitle.on('blur', () => { + this.spacedUpdate.updateNowIfNecessary(); + + this.deleteNoteOnEscape = false; + }); utils.bindElShortcut(this.$noteTitle, 'esc', () => { if (this.deleteNoteOnEscape && this.noteContext.isActive()) {