Unexpected Scrolling Behavior When Switching Tabs in Obsidian

I’ve encountered an issue where, when switching between two tabs, the cursor remains in its original position on the line, but the page unexpectedly scrolls all the way to the bottom. This behavior disrupts the editing flow and can be frustrating during time-sensitive work sessions.

Steps to Reproduce:

  1. Open two tabs in Obsidian.
  2. Start writing on a specific line in one tab.
  3. Switch to the second tab (or back to the first tab) while still editing ( using go to previous / next tab shortcuts )
  4. Notice that although the cursor stays at the same line, the view scrolls to the bottom of the document.

Expected Behavior:
The view should maintain its current scroll position or adjust appropriately to keep the cursor visible. The switching between tabs should not trigger an unexpected scroll to the bottom.

Workarounds/Attempts:

  • I’ve tried disabling various community plugins and switching themes, but the issue persists.
  • As a temporary measure, manually scrolling back to the intended position can work, but it’s not a practical long-term solution.
1 Like

You did not follow the bug report template completely.
Can you post a screen recording of this happening in the sandbox vault?

1 Like

Hey! Thanks for answering

I apologize for the delay. I’ve attached a screen recording demonstrating the issue using the sandbox vault.

Details:

  • Vim Mode: ON
  • Reproduction Steps:
    • The bug occurs within a callout that contains nested bullets (which I frequently use in my weekly reviews).
    • After using the zz command (in Vim mode) to center the cursor, I noticed that when switching back and forth between notes, the scroll position of the note unexpectedly moves down.

Please let me know if you need any further information.

Best regards,

The annoying problem has been happening since the beginning of April.

It’s not just about switching tabs inside Obsidian. It happens when switching applications as well via ALT+TAB or CMD+TAB:

  • ALT+TAB / CMD+TAB between Obsidian and some other app.

  • Scroll the other app and ALT+TAB back to Obsidian.

  • Scroll the Obsidian note: it jumps in a sluggish way, often several lines to the top or to the bottom.

Context:

  • The problem appears to happen only if we scroll the other app before coming back to Obsidian.

  • Often more pronounced if the other app is actually another Obsidian vault.

  • It’s not just about notes; it also happens in the Files sidebar and Settings.

  • Happens on Mac and Linux. Last time I tried on Windows was in March, and there was no problem on Windows.

  • The problem is intermittent, which is infuriating as it makes it impossible to even adapt ourselves to this unproductive situation.