Tab Indentation Inconsistent in Normal Text (Both Live Preview & Source Mode)

Steps to Reproduce

  1. Open Obsidian in Restricted Mode (no third-party plugins, no custom CSS, and default theme).
  2. Set tab size to 4 in Settings → Editor.
  3. Create a new note.
  4. Type a normal paragraph (not a list or code block).
  5. Press Tab once:
  • The cursor moves forward by one tab width.
  • However, the text visually indents by two tab widths instead of one.
  1. Start typing after the tab:
  • The text now indents by four spaces (instead of the expected one tab width).
  1. Repeat with tab size 2:
  • The issue still happens, but with a smaller scaling effect (one tab press results in one tab width visually, but expands to two spaces when typing).
  1. Repeat in Source Mode:
  • The same issue occurs in Source Mode, not just Live Preview.

Did you follow the?

:white_check_mark: Yes, the issue was tested in:

  • A sandbox vault (default settings, no plugins, no custom CSS).
  • A fresh vault with no modifications.
  • Both Live Preview & Source Mode.

Expected Result

  • Pressing Tab should move the cursor and indent the text by one tab width as defined in settings.
  • The indentation should remain consistent after typing.

Actual Result

  • Pressing Tab once visually indents by two tab widths.
  • When typing after pressing Tab, the text expands to four spaces instead of one tab width.
  • The issue occurs in both Live Preview and Source Mode.
  • Bullet lists and code blocks do not have this issue—it only affects normal paragraph text.

Environment

Obsidian Version: SYSTEM INFO:
Obsidian version: v1.8.4
Installer version: v1.8.4
Operating system: Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:16 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000 24.3.0
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

Operating System: (macOS / Windows / Linux + version)
Vault: Sandbox vault (default settings, no plugins, no custom CSS)


Additional Information

  • This does not happen in external editors like TextEdit, Notepad, or VS Code, ruling out a system-wide issue.
  • Issue persists even after restarting Obsidian and creating a fresh vault.
  • Issue scales based on tab size:
    • Tab Size 4 → Pressing Tab indents visually by 2 tab widths, expands to 4 when typing.
    • Tab Size 2 → Pressing Tab indents visually by 1 tab width, expands to 2 when typing.
  • Workaround: Using spaces (␣␣␣␣) instead of Tab avoids the problem.

Yes, this is part of the broader positioning issues of the cursor on the first char of indented blocks. It’s unlikely that we fix this in the short term.