Skip to content

Build your personal knowledge base with Trilium Notes

expand to note to be able to activate note

zadam8b9bf6e46fc7
diff --git a/src/public/javascripts/services/note_detail.js b/src/public/javascripts/services/note_detail.js
index 69f2bed91f..b17bb7d616 100644
--- a/src/public/javascripts/services/note_detail.js
+++ b/src/public/javascripts/services/note_detail.js
@@ -174,7 +174,11 @@ async function showTab(tabId) {
if (newActiveTabContext && newActiveTabContext.notePath) {
const newActiveNode = await treeService.getNodeFromPath(newActiveTabContext.notePath);
- if (newActiveNode && newActiveNode.isVisible()) {
+ if (newActiveNode) {
+ if (!newActiveNode.isVisible()) {
+ await treeService.expandToNote(newActiveTabContext.notePath);
+ }
+
newActiveNode.setActive(true, {noEvents: true});
}
}