Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
new split should keep the hoisted note
zadam8d6801bb8503
diff --git a/src/public/app/widgets/containers/split_note_container.js b/src/public/app/widgets/containers/split_note_container.jsindex dc3ff22c12..6cad410de2 100644--- a/src/public/app/widgets/containers/split_note_container.js+++ b/src/public/app/widgets/containers/split_note_container.js@@ -35,13 +35,17 @@ export default class SplitNoteContainer extends FlexContainer {}async openNewNoteSplitEvent({ntxId, notePath}) {+ const mainNtxId = appContext.tabManager.getActiveMainContext().ntxId;+if (!ntxId) {logError("empty ntxId!");- ntxId = appContext.tabManager.getActiveMainContext().ntxId;+ ntxId = mainNtxId;}- const noteContext = await appContext.tabManager.openEmptyTab(null, 'root', appContext.tabManager.getActiveMainContext().ntxId);+ const hoistedNoteId = appContext.tabManager.getActiveContext().hoistedNoteId;++ const noteContext = await appContext.tabManager.openEmptyTab(null, hoistedNoteId, mainNtxId);// remove the original position of newly created note contextconst ntxIds = appContext.tabManager.children.map(c => c.ntxId)