Skip to content

[6.x] Fix set picker position#14332

Merged
jasonvarga merged 1 commit into6.xfrom
set-picker-position
Mar 24, 2026
Merged

[6.x] Fix set picker position#14332
jasonvarga merged 1 commit into6.xfrom
set-picker-position

Conversation

@duncanmcclean
Copy link
Member

This pull request fixes an issue where creating a Set inside Bard would cause the set picker menu to appear at the very top of the content, instead of inline where the + button was clicked.

This was happening because the Primitive component (introduced in #14290) was rendering a default wrapper element (a <span>) around the trigger slot. This extra element became the popover's trigger reference for floating-ui positioning, instead of the actual transformed trigger element (the absolute div with translateY). Since the span was at its default position (top of the editor), the popover appeared there.

This PR fixes it by adding as-child to the Primitive components, which prevents them from rendering their own DOM element and instead merges props and event handlers with the child element, preserving correct trigger positioning for floating-ui.

Fixes #14311
Caused by #14290

@jasonvarga jasonvarga merged commit b7e8696 into 6.x Mar 24, 2026
18 checks passed
@jasonvarga jasonvarga deleted the set-picker-position branch March 24, 2026 15:46
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.

Creating a Set inside Bard causing odd menu placement

2 participants