Screen jump when change mode when there a lot latex

Problem

When you’re have a lot latex lines and swith modes between live and sourse, you’re screen jumps.

Video

2024-10-05_21-42-58.zip (969.0 KB)

Debug info

SYSTEM INFO:
Obsidian version: v1.6.7
Installer version: v1.4.16
Operating system: Windows 10 Pro 10.0.19045
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

This might not fix anything, but you have a very old installer. Please consider downloading and reinstalling Obsidian. There might be some changes that the auto-updater can’t fix for you.

Otherwise, I see what you mean in the video. (Though I can’t test it because I don’t have a document with a lot of latex. Are you willing to share that source .MD file so people can test?)

This problem happens on last instaler version as well, but thanks for advise of update installer.
File from my video:
test3.md (14.7 KB)
Also you can write some text and several latex block with environments Align or Gather (I guess fits any environments but I’m use these as usual) with 3+ lines and this thing may happens.

I can reproduce this in the Sandbox vault. And I’ll paraphrase what I understand the issue is.

One problem: In some ways, it’s ordinary that it jumps, because the shape of the text changes between modes. But the position doesn’t stay stable to the caret. In fact depending on your position in the text, when you switch modes, your active caret line might jump completely off the page!

Another problem: Live Preview to Source mode. As you switch back and forth, and back and forth, and back and forth, the position of the text on screen incrementally shifts more and more each time, moving like a caterpillar up or down the screen.