Skip to content

[6.x] Keep Bard sets alive when a dropdown opens inside them - #15690

Open
edalzell wants to merge 1 commit into
statamic:6.xfrom
edalzell:fix/bard-set-dropdowns
Open

edalzell wants to merge 1 commit into
statamic:6.xfrom
edalzell:fix/bard-set-dropdowns

Conversation

@edalzell

Copy link
Copy Markdown
Contributor

Opening any dropdown inside a Bard set (the set's own menu, a nested Replicator set's menu, a stacked Grid row's menu) recreates the set's NodeView and the menu closes immediately, whenever the set has other nodes on both sides of it. Reka's modal menu runs hideOthers, which stamps aria-hidden on every sibling along the trigger's ancestor path, including the editor's other top-level nodes. ProseMirror sees those attribute mutations on its own paragraph/heading DOM, re-parses the range between them, and the set in between is replaced. Nested fields lose their state, e.g. an expanded Replicator snaps shut.

Dropdown now renders non-modal when the existing isInBardField injection is present, so nothing inside the editor gets marked aria-hidden. Dropdowns elsewhere are unchanged. Verified in a sandbox with Playwright: all three menus open and the set element survives.

Related to #15687 (the remount that resets a nested Replicator's collapsed state); #15688 and #15689 cover the save-driven rebuilds.

@edalzell
edalzell requested a review from jaygeorge October 21, 2026 04:04

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant