global menu ref

This commit is contained in:
zadam
2022-11-24 22:59:09 +01:00
parent e4e20c8007
commit c7bda4d0be
3 changed files with 64 additions and 49 deletions

View File

@@ -799,6 +799,12 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
await node.setExpanded(isExpanded, {noEvents: true, noAnimation: true});
}
});
const activeNode = await this.getNodeFromPath(appContext.tabManager.getActiveContextNotePath());
if (activeNode) {
activeNode.setActive({noEvents: true, noFocus: false});
}
}
async expandTree(node = null) {