From 89ab22d51fcced4d9fa8e9566d1a4bf50026a14a Mon Sep 17 00:00:00 2001 From: Callum Loh Date: Sun, 9 Apr 2023 16:34:01 +0100 Subject: [PATCH] el includes subfolders. selfEL only holds that items div --- src/globals.d.ts | 2 +- src/main.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/globals.d.ts b/src/globals.d.ts index 4b098ef..83b3166 100644 --- a/src/globals.d.ts +++ b/src/globals.d.ts @@ -21,7 +21,7 @@ interface FileExplorerWorkspaceLeaf extends WorkspaceLeaf { interface FileExplorerViewFileItem extends TAbstractFile { titleEl: HTMLElement - el: HTMLElement + selfEl: HTMLElement } interface FileExplorerView extends View { diff --git a/src/main.ts b/src/main.ts index b81245a..02d5601 100644 --- a/src/main.ts +++ b/src/main.ts @@ -297,7 +297,7 @@ export default class FolderNotesPlugin extends Plugin { if(!fileExplorer) { return null; } const fileExplorerItem = fileExplorer.view.fileItems[path]; if(!fileExplorerItem) { return null; } - if(fileExplorerItem.el) return fileExplorerItem.el; + if(fileExplorerItem.selfEl) return fileExplorerItem.selfEl; return fileExplorerItem.titleEl; }