From 8b9bf6e46fc7350a3e1f60caf29537020a08c83c Mon Sep 17 00:00:00 2001 From: zadam Date: Wed, 1 Jan 2020 19:46:27 +0100 Subject: [PATCH] expand to note to be able to activate note --- src/public/javascripts/services/note_detail.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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}); } }