You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a Popover is rendered inside a Dialog, the Popover Content is hidden when the trigger is set as asChild.
After debugging the rendered components in the Tree and DOM, it seems although the components are being rendered, but the placement is wrong due to the triggerRef not being picked up.
We can also see that the --radix-popper-transform-origin is also empty, pointing to a lack of ref.
The React Dev Tools show these for the Props of the PopoverContext
Where the scope and triggerRef are undefined - We can also see a <ForwardRef/> Component being rendered as a child. This doesn't seem right as React 19 has deprecated forwardRef now.
Expected behavior
PopoverContent should be aligned with trigger.
Your environment
Software
Name(s)
Version
Radix Package(s)
dialog, popover
1.1.2
React
n/a
19
Browser
Arc/Chrome
Assistive tech
Node
n/a
npm/yarn
Operating System
The text was updated successfully, but these errors were encountered:
KieranTH
changed the title
Popover with asChild loses scope and triggerRef when inside Dialog - React 19
Popover with asChild loses triggerRef when inside Dialog - React 19
Dec 17, 2024
Bug report
Current Behavior
When a Popover is rendered inside a Dialog, the Popover Content is hidden when the trigger is set as
asChild
.After debugging the rendered components in the Tree and DOM, it seems although the components are being rendered, but the placement is wrong due to the
triggerRef
not being picked up.The Root inline styling:
We can also see that the
--radix-popper-transform-origin
is also empty, pointing to a lack of ref.The React Dev Tools show these for the Props of the PopoverContext
Where the scope and triggerRef are undefined - We can also see a
<ForwardRef/>
Component being rendered as a child. This doesn't seem right as React 19 has deprecated forwardRef now.Expected behavior
PopoverContent should be aligned with trigger.
Your environment
The text was updated successfully, but these errors were encountered: