dy-sh / obsidian-remember-cursor-position

Obsidian plugin. Remember cursor position for each note
MIT License
208 stars 12 forks source link

Cursor position persists when heading level target is initiated #46

Open zanodor opened 11 months ago

zanodor commented 11 months ago

Not sure since when this is happening.
Have heading level targets ever been prioritized? I seem to remember no issues in the past.

When I am saved with cursor position X in file 'Abc' and I click on [[Abc#Def]] from file 'Xyz', I would like cursor position X superseded.

Thanks

Joolyan commented 11 months ago

Same on macOS 13.6 with Osidian 14.14

"This plugin shouldn't scroll if you used a link to the note header like link. If it did, then increase the delay until everything works."

Changing "delayAfterFileOpening" between 0, 100 and 300 doesn't seem to change the behaviour.

ondrobaco commented 9 months ago

I second this, I use links to headers extensively. Linking to a very long main document. When I click the link the main document opens at the last cursor position and not at the heading that was linked to. (otherwise fantastic plugin, thank you for it :))

ShootingKing-AM commented 5 months ago

Same on macOS 13.6 with Osidian 14.14

"This plugin shouldn't scroll if you used a link to the note header like link. If it did, then increase the delay until everything works."

Changing "delayAfterFileOpening" between 0, 100 and 300 doesn't seem to change the behaviour.

Having the same issue, on Windows too. I open a file#abc from another note via ![[file#abc]] link and instead of going to file's abc heading, it goes to last cursor positions immaterial of delay set in settings :c

Azmoinal commented 5 months ago

It seems that behavior as been reported in different issue; anyway I confirm that on all my devices: iOS, iPadOS, MacOS and Windows.

Manually modfying json configuration to put a value greater than 300ms (I tried 2s) doesn't change the behaviour. Moreover it seems that putting a very large value like 10s clicking on a header and putting the cursor on a place near the, correctly, selected header; it doesn't work as a workaround because the plugin will move, in any case the cursor to the position that was availale when the file has been opened, reagardeless of the current position.

The only solution, I identified on desktop applications and on iPad with an external keyboard is to open the preview instead of the page itself.