-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Bug report
Current Behavior
Popover does not open at anchor when using a relative div.
Expected behavior
Popover should open at anchor, or at least functionality should remain the same with minor version bump.
Reproducible example
<Popover>
<div className="relative">
<PopoverAnchor asChild>
<input className="border" placeholder="just an input..." />
</PopoverAnchor>
<PopoverTrigger asChild className="absolute inset-y-0 right-2">
<button className="bg-gray-200 px-1" type="button">
Trigger
</button>
</PopoverTrigger>
</div>
<PopoverContent className="p-1 bg-gray-200" align="start">
Content
</PopoverContent>
</Popover>
Additional context
This bug was introduced in version 1.1.15 of @radix-ui/react-popover as it worked correctly in version 1.1.14: CodeSandbox Template
Your environment
| Software | Name(s) | Version |
|---|---|---|
| Radix Package(s) | @radix-ui/react-popover | 1.1.15 |
| React | n/a | 19.0.0 |
| Browser | chrome | 142.0.7444.176 |
| Assistive tech | - | - |
| Node | n/a | 20.12.0 |
| npm/yarn/pnpm | npm | 10.5.0 |
| Operating System | macos | 15.7.2 |
vaasu-clinia, dBaliukynas and dannick-clinia
Metadata
Metadata
Assignees
Labels
No labels