Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[6.x] Prevent dropping nav item with children into root position#13861

Open
duncanmcclean wants to merge 1 commit into6.x from
root-nav-items
Open

[6.x] Prevent dropping nav item with children into root position #13861
duncanmcclean wants to merge 1 commit into6.x from
root-nav-items

Conversation

@duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Feb 9, 2026

This pull request fixes an issue where it was possible to drag & drop a nav item with children into the root position. Root nav items can't have children.

We were previously passing a hook via the rootDroppable prop to handle this. Although, it wasn't working (the hook is called when you drag items, not when you drop them) and was removed in #12582.

This PR attempts to fix it by checking the new root entry in the afterDrop event listener.

Closes #13826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

CP Navigations - can ́t add Subitem to Main Navigation Item via drag and drop

1 participant

AltStyle によって変換されたページ (->オリジナル) /