Folded sections on line 1 get stuck being folded / Properties Stuck Folded

Steps to reproduce

  1. Enter note
  2. Fold anything on line 1, like a heading
  3. Close note
  4. Reopen note
  5. Unfold section
  6. Close note
  7. Reopen note

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

This has been tried in the sandbox vault.

Expected result

The section would be unfolded.

Actual result

The section is folded.

Environment

SYSTEM INFO:
Obsidian version: v1.5.3
Installer version: v1.4.13
Operating system: Windows 10 Home 10.0.22631
Login status: not logged in
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

So the note folds are stored in Local Storage and I’ve found that when you reopen the note for the first time after folding the section, a fold {from: 0, to: 0} is created for that note. This seems to somehow relate to whatever’s causing the bug because as soon as that appears, the problem starts. This doesn’t get created if there is a fold in any position other than line 1.

I can repro in the Sandbox Vault on Mac :innocent:

  1. Open the Sandbox

  2. Turn the first line of the note Start Here into a H1

    • the first line being: Hi, welcome to Obsidian!
  3. Fold the newly created H1 in Start Here

  4. Close Start Here

  5. Reopen Start Here

  6. Unfold the H1 (“Hi, welcome to Obsidian!”)

  7. Close Start Here

  8. Reopen Start Here

    • Result: H1 is still folded when Start Here is re-opened

Fold line 1

This doesn’t seem to happen if Properties are added to Start here though


Environment:

SYSTEM INFO:
	Obsidian version: v1.5.3
	Installer version: v1.4.13
	Operating system: Darwin Kernel Version 20.6.0: Thu Jul  6 22:12:47 PDT 2023; root:xnu-7195.141.49.702.12~1/RELEASE_X86_64 20.6.0
	Login status: logged in
	Catalyst license: supporter
	Insider build toggle: on
	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

1 Like

Steps to reproduce

Make a new note or edit an existing one.
Make sure that the very first character in the body of the note is a # symbol, typically denoting a heading in Markdown. It doesn’t matter if there is one or more of # symbols, as long as the note starts with one and it results in a heading. Example: # The story begins.
Collapse the entire heading (write some text under it to easily confirm).
Close the tab/restart Obsidian.
Uncollapse the heading.
Close the tab/restart Obsidian.
The heading will remain collapsed when you open the note from this point on. Uncollapsing it will show the text underneath, but only while the tab is open. Closing the tab in any way, including restarting Obsidian, will collapse the heading again.
This only happens if the note begins with a # symbol! If you add some text in front of the heading, the bug will not appear.

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

Y

Expected result

Obsidian actually remembering the state of the heading, just like it does with every other heading in the body of any note.

Actual result

The very first heading of the note, assuming it starts with the symbol # and nothing preceding it, once collapsed, will return to being collapsed upon reopening the note no matter what.

Environment

SYSTEM INFO:
Obsidian version: v1.5.3
Installer version: v1.5.3
Operating system: Windows 10 Pro 10.0.19045
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

ALSO TESTED ON ANDROID:

SYSTEM INFO:
Operating system: android 13 (Xiaomi 22101316UG)
Obsidian version: 1.4.16 (114)
API version: v1.4.16
Login status: not logged in
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

thanks

1 Like

This affects properties as well

will be fixed 1.5.9