Fold All Glitch in Preview Mode

Steps to reproduce

  1. Paste this into a new note: https://pastebin.com/KJr0iJAH
  2. Go into Preview mode
  3. Fold All hotkey

Expected result

To see all the headers separated as it should and interact with them without issue.

Actual result

Every header except the topmost one is visible.
(And each header has 2 hashes so it’s not because the topmost one has 1 hash and is higher in the hierarchical order, thus folding everything under it.)

Environment

  • Operating system: Windows 10 Pro x64
  • Obsidian version: 0.9.15

Additional information

fold-issue

My friend has the full text of Dracula divided into three chapter chunks, my Pastebin link was one of the notes, and it seems like this is an issue on all of them. I don’t know what counts for “too long” of a document but I can only see that being the issue and is bugging out the folding because there doesn’t seem to be any formatting error and the Folding/Unfolding works perfectly fine in Edit mode. It also works on smaller documents too. The document I provided was 15,358 words / 77,563 characters / 76.8 kb.

I can actually force the desired result (showing the three headers separate and folded) by Folding All multiple times (5 times in my case) and then the two other headers pop back up. (This is demonstrated in the above GIF). Note, this doesn’t actually fix the issue but only provided the desired appearance. Preview mode still can’t be used practically with the folding features because the issue comes back if…

  1. I leave the page and come back to try again.
  2. After step 3, I unfold all and fold all again, the other two disappear. (Also shown in GIF)
  3. I unfold the 1st header with my mouse (revealing the missing two headers and the rest of the text) and fold it again with my mouse, the other two headers disappear. (Oddly this doesn’t happen if I unfold->fold the 3rd header. But if I unfold->fold the 2nd header, the 3rd one disappears.)

Weirdly too, the issue doesn’t come back IF I click my other document pane (I have the Edit and Preview pane linked side by side), click back to the Preview pane, and spam unfold and fold all to test it. They don’t disappear now unless I do any of the mentioned three scenarios above. So because of that, I still can’t view the document properly and interact with it with folding.

The problem isn’t much of an issue for this particular text but I can see it being one if I had a larger document with more formatting and would like to fold things to view it easier. Or is this document too large to begin with and should be avoided? haha I’m new to all the managing notes digitally so I’m not sure and am overthinking maybe.

5 Likes

thanks. I can repro

2 Likes

Second @Xero above- Folding is glitchy for me as well. Folding seems to change sometimes when switching between edit and preview modes. Alternating between the two modes several times seems to correct it as well.

Fold all seems to also fold code inside code blocks- it would be nice to have the option to fold all text blocks but spare code blocks from folding.

Since this is my first post- I would also like to thank the developers; I’ve been using Obsidian for a bit now and it has slowly taken over my workflows. The interface is intuitive, robust, and a genuine pleasure to work with.

I’ve been having this issue constantly on a properly formatted note with less than 5000 words. Usually the second half of the top level headings disappear upon folding all.

I should have searched first. I just finished writing a long report explaining all the ins and outs of this.

Anyways, I will just add that zooming in or out or unfolding last heading or clicking one of the missing outline pane headings can correct this.

Thanks.

Will be fixed in 0.10.6

4 Likes

I was also suffering from this bug. Just installed 0.10.6 — confirming, seems to be fixed here! :pray:

1 Like

I just checked and wow it IS fixed! :slight_smile:
I applaud the fact that you moderators go back to posts so thoughtfully to update us on the news, it was such a weird bug too haha (to me, who knows nothing about coding anything).

Thank you!

2 Likes