When toggling between preview and edit mode the page goes back to the top

Steps to reproduce

When I’m in the middle of a long file, and I toggle from edit to preview mode it goes to the top of the file. If I toggle back to edit mode it goes back ta where it was (where it should be)

Expected result

It should just show the preview of the file focusing on the part I was previously in edit mode

Actual result

It goes to the top of the page

Environment

  • Operating system: Windows 10
  • Obsidian version: v0.12.12

Additional information

Here is a video showing what is happening

You know we don’t take bug reports when plugins and custom css are enabled?

If you can repro this in the help vault, open a new bug report and

  1. attach a screen recording
  2. attach a copy of the file that is causing this.

Thanks

Also this: Triggering preview mode in long docs causes preview to scroll to top of document in certain cases