Skip to content

Build your personal knowledge base with Trilium Notes

don't open new tab after duplicating subtree

zadam564fea43a95f
diff --git a/src/public/app/services/note_create.js b/src/public/app/services/note_create.js
index 063089d584..cc7aa4380b 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`);