Arrow up on heading line moves cursor to start of the line instead of prev line

Steps to reproduce

  1. Make sure live preview edit mode is active.
  2. Create a document:
some test
## Header 2

  1. Move cursor position to end of ## Header 2
  2. Press arrow up button.

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

Yes. Steps were reproduced in a pristine new vault, no snippets, no plugin, no custom CSS .

Expected result

Cursor jump to the line above - some test

Actual result

Cursor jump to the start of the same line - ## Header 2

Environment

SYSTEM INFO:
Obsidian version: v1.8.7
Installer version: v1.7.7
Operating system: Darwin Kernel Version 24.0.0: Tue Sep 24 23:36:26 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T8103 24.0.0
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

  • Adding custom CSS that disables padding fixes the issue.
  • Making padding tiny, like 4px also fixes the issue.

I cannot reproduce this with installer version v1.6.5. I’m also using mac sequoia version 15.2.

On v1.6.5 installer it does not happen.

However, on v1.6.5 if you place the cursor after the Hea and press up, it still does not work as expected.

Download and reinstall Obsidian. Please, post a screen recording of this happening in the sandbox vault. Thanks

This is true and nice observation! Some examples (with my version):

  • #|# Header 2
  • ## H|eader 2
  • ## He|ader 2
  • ## Hea|der 2

I can confirm this happens on the newest installer and Obsidian version.

SYSTEM INFO:
	Obsidian version: v1.8.9
	Installer version: v1.8.9
	Operating system: Darwin Kernel Version 24.2.0: Fri Dec  6 18:51:28 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T8112 24.2.0
	Login status: not logged in
	Language: en
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 0
	Plugins enabled: 0

RECOMMENDATIONS:
	none

I haven’t been able to reproduce any problem. Maybe there is something that I am missing.

https://imgur.com/a/MNleO5W

Key presses are not shown (I press up arrow key).

Thanks for posting the screen recording. That is what happens in my case too.

In my case, it is with block ID. When I add block ID for a line then move my cursor down with down arrow key, the cursor jumps to the start of the line, not at the end.

Screen Recording 2025-03-06 at 02.44.34

I’m experiencing the same problem (v1.8.9) on Linux. I discovered that if I go into Settings->Outliner and change “Stick the cursor to the content” to “Never” then I’m able to use the up arrow in the outline. If its set to any other setting then hitting the up arrow moves the cursor to the beginning of the bullet, but will not move it up.

I can reproduce this. MacOS 14.4.1, installers 1.8.7 and 1.8.9, tested in the Sandbox vault.

headerMoveBug

In the gif above, the caret is in the middle of “Header 2”. First up moves to start of line. Second up moves up a line to “some test”. Third up moves up a line.

SYSTEM INFO:
Obsidian version: v1.8.9
Installer version: v1.8.9
Operating system: Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 23.4.0
Login status: logged in
Language: en
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none