diff --git a/app/assets/javascripts/views/notes/notes_view.ts b/app/assets/javascripts/views/notes/notes_view.ts index 5ad8a32c8..1911fa0cf 100644 --- a/app/assets/javascripts/views/notes/notes_view.ts +++ b/app/assets/javascripts/views/notes/notes_view.ts @@ -255,7 +255,7 @@ class NotesViewCtrl extends PureViewCtrl { if (selectedTag.isSmartTag && !selectedTag.isAllTag) { return; } - return this.createNewNote(); + return this.createNewNote(false); } streamNotesAndTags() { @@ -354,7 +354,7 @@ class NotesViewCtrl extends PureViewCtrl { await this.appState.notes.selectNote(note.uuid, userTriggered); } - async createNewNote() { + async createNewNote(focusNewNote = true) { this.appState.notes.unselectNotes(); let title = `Note ${this.state.notes.length + 1}`; if (this.isFiltering()) { @@ -365,7 +365,9 @@ class NotesViewCtrl extends PureViewCtrl { await this.reloadNotes(); await this.appState.noteTags.reloadTags(); const noteTitleEditorElement = document.getElementById('note-title-editor'); - noteTitleEditorElement?.focus(); + if (focusNewNote) { + noteTitleEditorElement?.focus(); + } } async handleTagChange(tag: SNTag) {