Jumping cursor when indenting text

Steps to reproduce

To reproduce:

  • Open the Sandbox Vault.
  • Disable “Show indentation guides”.
  • Insert a tab character and type any character.

Expected result

  • Behave like the Legacy Editor:
    • When you insert the tab, move the cursor the correct number of spaces (4 by default)
    • Don’t move the cursor when you start typing

Actual result

  • When you insert the tab, the cursor moves ahead more than the correct number of spaces
  • When you type a letter, the cursor moves to the LEFT, then inserts the character

Environment

  • Operating system: macOS
  • Debug info:
SYSTEM INFO:
	Obsidian version: v1.0.3
	Installer version: v0.15.8
	Operating system: Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000 21.6.0
	Login status: logged in
	Catalyst license: none
	Insider build toggle: off
	Live preview: off
	Legacy editor: on
	Base theme: dark
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 6
	Plugins enabled: 1
		1: List Modified v1.3.3

RECOMMENDATIONS:
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Additional information

Slightly more context here

Both this and Misaligned line gutters with indented text are due to what parser thinks those lines are (regular text, codeblock, etc) and consequently how they should be rendered (font, spacing, gutter).

This is a hard problem and, to be frank, is a very low priority one.
If you are annoyed by this behavior, I suggest you create a custom CSS with no customizations at all and a simple monospace font for everything, basically strip away everything and just have a really plain text editor.

Maybe that’s what we should do with “source mode” now that there is “live preview”.

1 Like

This is a hard problem and, to be frank, is a very low priority one

That might be true, I don’t know. But I do know that the Legacy Editor solved this hard problem. It doesn’t experience this bug.

Might be solvable with CSS, but Legacy Editor works great for me, so I’m going to continue to use it.

This is a hard problem

Can you elaborate on the problem?

Not the symptom, obviously, I can see that just fine, but you know what’s causing it in the new editor?

Steps to reproduce

Create a new note, enter some text, then press tab to indent a level. After indenting, start typing. When typing the first character, the cursor jumps off to the side.

CleanShot 2024-04-10 at 21.21.31

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

Yes. I use restricted mode and the default theme all the time.

Expected result

When I start typing, the cursor would not jump to the right.

Actual result

When I start typing, the cursor jumps to the right and text doesn’t start where the cursor is by default when indented.

Environment

SYSTEM INFO:
Obsidian version: v1.5.12
Installer version: v1.4.14
Operating system: Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 23.1.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

1 Like

Steps to reproduce

  1. Open any note
  2. Write a text in a new line
  3. Hit the tab on that text to offset the text one tab
  4. Notice: The cursor is offset from the start of the text (Image 1). Selecting the text highlights that there is some misplaced space? (Image 2)

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

Y

Expected result

The cursor and text should not be offset or separated from each other after a tab exactly like with bullet points.

Actual result

The cursor is offset from the text

Environment

SYSTEM INFO:
Obsidian version: v1.74
Installer version: v1.6.7
Operating system: Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:51 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6030 23.2.0
Login status: not logged in
Insider build toggle: off
Live preview: off
Base theme: light
Community theme: Things v2.1.20
Snippets enabled: 1
Restricted mode: off
Plugins installed: 13
Plugins enabled: 13
1: Advanced Tables v0.22.0
2: Code Editor Shortcuts v1.14.0
3: Copy button for code blocks v0.1.0
4: Excalidraw v2.5.2
5: Iconize v2.14.3
6: Hotkeys++ v0.2.7
7: Image Captions v1.1.3
8: Image in Editor v2.2.6
9: LanguageTool Integration v0.3.7
10: Image Toolkit v1.4.2
11: Markdown Table Editor v0.3.1
12: Media Extended v3.2.6
13: Pandoc Plugin v0.4.1

RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

1 Like