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
fix(tree): use data.tree and save/restore activeVisible in beforeActivate
Kevin Leutzingerbda897d72a7e
diff --git a/apps/client/src/widgets/note_tree.ts b/apps/client/src/widgets/note_tree.tsindex 8651731fb6..39c23b1850 100644--- a/apps/client/src/widgets/note_tree.ts+++ b/apps/client/src/widgets/note_tree.ts@@ -470,9 +470,10 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {// preventing the automatic makeVisible/scrollIntoView call on direct tree interaction.// Restored after the current task via setTimeout so only this activation is affected.if (!this.treeScrollFollowNavigation) {- this.tree.options.activeVisible = false;+ const prevActiveVisible = data.tree.options.activeVisible;+ data.tree.options.activeVisible = false;setTimeout(() => {- this.tree.options.activeVisible = true;+ data.tree.options.activeVisible = prevActiveVisible;}, 0);}