Rearranging closed ## subheaders at the bottom of the outline will combine ### subheaders unexpectedly

Once you’ve done the above, delete everything above this line.

Steps to reproduce

The issue is when rearranging one ## header below another ## header if they are at the bottom of the # header outline. The ### header inside the ## header seems to shift and combine into one ## header.
The screenshots show the process well but I will type it too.

Create a header named # Top.
Create two subheaders, both inside # Top, named ## Circle Fanclub and ## Triangle Fanclub.
Create two more subheaders,
inside ## Circle Fanclub create ### Circle Chart.
Inside ## Triangle Fanclub create ### Triangle Chart.
Add any text you want below all of these headers so you can see the note rearrange improperly.
Now for the bug.

In the outline drag ## Circle Fanclub below ## Triangle Fanclub.
The rearranging should be inside # Top.
Also the ## Triangle Fanclub and ## Circle Fanclub need to be collapsed when rearranging.
This bugs the ### subheaders to combine and notes shift in unexpected ways.

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

Yes

Expected result

For the ## subheaders to rearrange properly without the notes inside or ### subheaders to unexpectedly shift out of the ## subheader into another ## subheader.

Actual result

The ### subheaders and notes shift into the bottom ## subheader.

Environment

SYSTEM INFO:
Obsidian version: v1.9.14
Installer version: v1.8.10
Operating system: Windows 11 Home 10.0.26100
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



Do they need to be collapsed in the note body or in the outline tab?

I can reproduce on desktop (Mac), tho I found it a little difficult. I haven’t noticed this behavior previously because when I drag all the way to the bottom it tries to move the heading to first level, which doesn’t work so it does nothing. So I usually work around by dragging the heading the the next to last position and then dragging the last one up.

When dragging a heading, the width of the purple line changes to indicate where in the outline it will go. I started writing up some specifics of the dragging behavior, but found it more complicated than I expected. Possibly things behaving as intended, or there maybe more bugs or a more general bug.

On mobile (iOS) I’m not able to reproduce the behavior because at the bottom the purple line jumps from third level to first level. I can’t get it to offer second level. Dropping the heading at first level does nothing (the heading stays where it was).

For anyone who wants to test, here is a code block for convenient copying.

# Top

## Circle Fanclub

Circle Fanclub text. 

### Circle Chart

Circle Chart text.

## Triangle Fanclub

Triangle Fanclub text.

### Triangle Chart

Triangle Chart text.

The bottom ## subhead needs to be collapsed in the outline tab for the bug.

Also when trying to reproduce it again today I noticed that you can drag ## Circle Fanclub on top of ## Triangle Fanclub.
The result is that the ### Triangle Chart shifts into ## Circle Fanclub which seems like intended behavior as your dragging and dropping on the subheader itself so it make sense they combine. Like dragging and dropping a file into a folder.

This is exactly the same result as the bug produces. So I think when trying to rearrange ## Circle Fanclub right below ## Triangle Fanclub the outline thinks you are actually dropping it inside the subheader, instead of below.

That’s my impression too.

Actually, rearranging a # header below another # header has the same result. I can’t move anything around in the outline without headers and notes combining all over the place.

At the moment rearranging anything in the outline is not worth it.
Dragging around closed headers or subheaders in the outline will combine subheaders and notes.

The only to way to keep this from happening is to open all the headers and subheaders of the location of where you are going to move the header to. Then drag it below all the open subheaders.

Related: