diff --git a/src/public/app/services/entrypoints.js b/src/public/app/services/entrypoints.js index b60888365..dff5497cf 100644 --- a/src/public/app/services/entrypoints.js +++ b/src/public/app/services/entrypoints.js @@ -80,7 +80,7 @@ export default class Entrypoints extends Component { await appContext.tabManager.openContextWithNote(note.noteId, true, null, hoistedNoteId); - appContext.triggerEvent('focusAndSelectTitle'); + appContext.triggerEvent('focusAndSelectTitle', {isNewNote: true}); } async toggleNoteHoistingCommand() { diff --git a/src/public/app/services/note_create.js b/src/public/app/services/note_create.js index 641b5e377..778cf237d 100644 --- a/src/public/app/services/note_create.js +++ b/src/public/app/services/note_create.js @@ -52,7 +52,7 @@ async function createNote(parentNotePath, options = {}) { await activeNoteContext.setNote(`${parentNotePath}/${note.noteId}`); if (options.focus === 'title') { - appContext.triggerEvent('focusAndSelectTitle'); + appContext.triggerEvent('focusAndSelectTitle', {isNewNote: true}); } else if (options.focus === 'content') { appContext.triggerEvent('focusOnDetail', {ntxId: activeNoteContext.ntxId}); diff --git a/src/public/app/widgets/note_title.js b/src/public/app/widgets/note_title.js index 4003b7942..71cf0db42 100644 --- a/src/public/app/widgets/note_title.js +++ b/src/public/app/widgets/note_title.js @@ -4,6 +4,7 @@ import protectedSessionHolder from "../services/protected_session_holder.js"; import server from "../services/server.js"; import SpacedUpdate from "../services/spaced_update.js"; import appContext from "../services/app_context.js"; +import branchService from "../services/branches.js"; const TPL = `