diff --git a/src/public/javascripts/services/note_detail.js b/src/public/javascripts/services/note_detail.js index 69f2bed91..b17bb7d61 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}); } }