From 564fea43a95f83de99d9ed8f917886c2653f32fb Mon Sep 17 00:00:00 2001 From: zadam Date: Fri, 9 Apr 2021 23:40:15 +0200 Subject: [PATCH] don't open new tab after duplicating subtree --- src/public/app/services/note_create.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/public/app/services/note_create.js b/src/public/app/services/note_create.js index 063089d58..cc7aa4380 100644 --- a/src/public/app/services/note_create.js +++ b/src/public/app/services/note_create.js @@ -90,7 +90,8 @@ async function duplicateSubtree(noteId, parentNotePath) { await ws.waitForMaxKnownEntityChangeId(); - await appContext.tabManager.activateOrOpenNote(`${parentNotePath}/${note.noteId}`); + const activeTabContext = appContext.tabManager.getActiveTabContext(); + activeTabContext.setNote(`${parentNotePath}/${note.noteId}`); const origNote = await treeCache.getNote(noteId); toastService.showMessage(`Note "${origNote.title}" has been duplicated`);