Links to internal headings do not jump to heading line

Steps to reproduce

  1. Create a heading in a document, such as “# heading1”.
  2. Add content or blank lines until heading1 has scrolled off the page.
  3. (Optional) - create a 2nd heading, such as “# heading2”.
  4. Add an internal link to heading1, such as “[heading1](#heading1)”
  5. Click on the internal link to heading1.

Expected result

The cursor or the center or top of the portal window should jump to the “# heading1” line.

Actual result

All of the content of heading1 is highlighted, and the portal jumps to the last line under that heading. If the link to the heading directly follows the linked heading’s content, the window does not jump at all.

Environment

  • Operating system: Windows 10
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.15.9
    Installer version: v0.15.9
    Operating system: Windows 10 Home 10.0.19043
    Login status: logged in
    Catalyst license: none
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: light
    Community theme: none
    Snippets enabled: 2
    Restricted mode: off
    Plugins installed: 11
    Plugins enabled: 11
    1: txt as md v0.0.1
    2: Shortcuts extender v2.2.0
    3: Tasks v1.8.0
    4: Style Settings v0.4.10
    5: Lapel v0.0.3
    6: Smart Typography v1.0.17
    7: Hotkey Helper v0.3.11
    8: Tabout v1.0.0
    9: Go to Line v0.0.2
    10: Task Progress Bar v1.5.1
    11: Underline v1.2.1

Additional information

I have reproduced this behavior in the sandbox vault.

The use case for this is very simple. I have a document with a heading with a lot of content underneath. Immediately following that, I have another heading. I want to be able to navigate by link between these two headings. Unfortunately, the behavior described above means this is not possible.

This is a good bug report, but a duplicate (it’s under Feature Requests because that’s where the devs wanted it).

Oh, I see. Found the topic in question: EDITOR: When navigating to an internal link with a heading or block ref, move cursor and viewport to the beginning of the target location

I see it’s going to be fixed/implemented in 0.16.

Thanks for the heads up!

1 Like

I forgot that it’s going to be fixed! I’m enjoying the news all over again. :slight_smile:

1 Like

Thanks I was about to link that.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.