First switch to preview does not open the document to the right location

Steps to reproduce

Say I am working on a long note, and I am in Edit mode, and when I type Cmd+E the cursor jumps to the top. Typing Cmd+E again I get back to the Edit mode to the point I was before. Then typing Cmd+E the note goes back to Preview with the cursor positioned where I was in Edit mode.

Expected result

The cursor to stay at the same spot when switching between Edit and Preview.

Actual result

Typing Cmd+E again I get back to the Edit mode to the point I was before. Then typing Cmd+E the note goes back to Preview with the cursor positioned where I was in Edit mode.

I made a video, unfortunately a Gif would be 13 MB, so I saved it as an mp4 file. This forum does not accept the mp4 format, so you can view the file here.

Environment

  • Operating system: macOS 10.14
  • Obsidian version: 0.8.8

Additional information

This is an extremely annoying issue, and has been raised as a feature request here.

1 Like

We had this issue a while ago and it was fixed.
I can’t quite reproduce what you are describing however I notice one thing. There is delay the first time you do cmd-e (because the text hasn’t been rendered).
Try to hit cmd-e the first time and wait. Does it scroll to the right location after a delay?

If this issue was fixed I did not notice it.

There are others who have the same problem - see here.

No, it does not, I have to do Cmd-E twice, as I show in the video I linked to.

@Comandra_umbellata says he can’t reproduce it now. We’ll see if we can gather more reports to pinpoint where exactly the problem is.

@WhiteNoise: in his initial comment above @ryanjamurphy links to a feature request that mentions the exact same problem, and that was in 0.6.5 !!

Here is the link.

We are conflicting two separete things here.

  1. Switching to the right location in preview. (which is done, maybe there is bug?!?)
  2. Remembering the position in a document unpon closing and reopeing obsidian. (this is a feature request todo)

@WhiteNoise: OK, fair enough. If there are others with my issue it’ll hopefully get fixed; if there aren’t I’ll have to live with it I guess.

you can send me the file that is causing you problems, maybe I can reproduce with that.

@WhiteNoise: it isn’t just 1 file, it is all my files. I’ll send you a file via a DM on Discord.

I repro for the file you sent me. We’ll look into it.

OK, thanks, I’ll await your findings.

will be fixed in 0.8.11

@WhiteNoise: thanks for the feedback. So, it is something in Obsidian, and not in the file. Phew ! I have a lot of notes in that collection.

Not 100% sure about the rest of your vault, but we did manage to make it work for the file you sent me.