Renaming a heading jumps to the internal link location

Steps to reproduce

Bug 1 — After renaming a heading, Obsidian jumps to the internal link instead of staying at the edited heading

  1. Open a note that contains:
  • A heading ## Example Heading
  • An internal link pointing to this heading, e.g. [[#Example Heading]]
  • Important: this internal link is located above the heading in the same file.
  1. Right-click the heading → choose Rename heading.
  2. Change the heading text and click Save.

Did you follow the troubleshooting guide? [Y/N]

Y
Reproduced in sandbox vault with:

  • Default theme
  • No community plugins
  • No CSS snippets

Expected result

Bug 1

After clicking Save, the editor should remain at the heading I just renamed.
It should not jump to any internal link elsewhere in the document.


Actual result

Bug 1

After clicking Save, the editor jumps to the location of the internal link that points to this heading (especially when that link is located above the heading).
This disrupts editing because the cursor is moved away from the heading location.


Environment

(Please paste your Show Debug Info output here.)

Obsidian:1.10.3


Additional information

Screenshots or screen recordings will help reproduce this issue more precisely.

I can reproduce Bug1. I can’t reproduce Bug 2.

I will delete Bug2 in your report. If you still experience it. Open a separate BR and follow the BR template. Thanks