mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
expand to note to be able to activate note
This commit is contained in:
parent
631a75deec
commit
8b9bf6e46f
@ -174,7 +174,11 @@ async function showTab(tabId) {
|
|||||||
if (newActiveTabContext && newActiveTabContext.notePath) {
|
if (newActiveTabContext && newActiveTabContext.notePath) {
|
||||||
const newActiveNode = await treeService.getNodeFromPath(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});
|
newActiveNode.setActive(true, {noEvents: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user