ozntel / file-tree-alternative

This Obsidian Plugin allows users to have a different file explorer experience.
456 stars 32 forks source link

Opening note in folder with lots of notes will reset scroll position to the top #162

Open metronidazole opened 1 year ago

metronidazole commented 1 year ago

If you have a lot of notes in a single folder, opening any note will reset the scroll position of notes back to the top.

This is a problem if you have a lot of notes in a folder as if you want to jump between notes, you have to keep scrolling back down which gets annoying fast.

Current situation

Ideal situation

bgwwg commented 1 year ago

If you open a note in a new tab by using ctrl+click, you will notice that the file list does not scroll.

I made an modification to the main.js file in the plugin folder. I changed e=c.workspace.getLeaf(r) to e=c.workspace.getLeaf(!0), so a new tab is always created when a file is clicked.

s1011205 commented 1 year ago

I just disabled this plugin because the file list would jump to the top when I would tap-click on a file using my Apple Trackpad. If it gets fixed, I might go back to using it.

ozntel commented 11 months ago

Can you try if the last update helps with this issue? I changed a couple of things that should help with this issue

metronidazole commented 11 months ago

Can you try if the last update helps with this issue? I changed a couple of things that should help with this issue

It's still happening (v2.4.2) but the frequency is about 50% less.

ozntel commented 11 months ago

@metronidazole Can you send me more details about times when it happens? Maybe some recording would be helpful so that I can identify the issue?

metronidazole commented 11 months ago

Here is a video. You can see that occasionally when clicking on an item, the view will reset to the top of the folder and the item is not opened

https://github.com/ozntel/file-tree-alternative/assets/41497550/7d18b1ea-59b7-42e5-9087-07b0a69d9bdd