Closed denvolok closed 4 months ago
It's a standard(expected) behavior of Obsidian, but would be nice to fix it.
Use the following function to select item manually:
this.registerEvent( this.app.workspace.on("active-leaf-change", (leaf) => { if (leaf?.view.getViewType() === "file-explorer") { const fileExplorer = this.app.workspace.activeLeaf?.view as View; // @ts-ignore fileExplorer.tree.setFocusedItem(item, 1); } }), );
Scenario: open note -> close note -> focus file explorer
won't fix. Can reproduce only if closed note was last focused in file explorer, and there seems no reliable soluton
It's a standard(expected) behavior of Obsidian, but would be nice to fix it.
Use the following function to select item manually:
Scenario: open note -> close note -> focus file explorer