shichongrui / obsidian-reveal-active-file

Obsidian plugin to reveal the active file automatically when you open a file
93 stars 11 forks source link

fix: fix for obsidian v0.15.6. focus on editor after revealing file. #13

Closed anselmwang closed 2 months ago

anselmwang commented 2 years ago

In the past, after revealing a file, the editor still has focus. But since obsidian v0.15.6, the editor loses focus.

The PR fix this bug.

pjeby commented 2 years ago

If I understand this patch correctly, this won't work for image files, PDFs, Kanbans, Excalidraw, media files, or really anything except markdown files. If you click on or open a non-markdown file, it would cause the focus to go to the file explorer, and then to any other open markdown file (even one in another window). Or if there aren't any markdown files open, it would stay focused on the file explorer.

Have you tested whether it works with non-markdown files or views? (e.g. Kanban)

anselmwang commented 2 years ago

I think you are right. The solution doesn't work for non-markdown files.

I am fine to discard this PR.