Skip to content

Popover - invalid value for --radix-popper-available-width #2128

Closed
@Powerplex

Description

@Powerplex

Bug report

Current Behavior

Hey :)

I am trying to create a design system Popover using radix Popover primitives.
We were trying to use collisionBoundary to force the Popover to stay in a given container.

From what I understand, Radix is using Floating UI to get the positionning data, and set them in css custom properties that we should use to apply the styles.

For some reason --radix-popper-available-height calculation is correct, but --radix-popper-available-width:-495px; it not.. For it we have huge negative values (ex: -495px).

Capture d’écran 2023-05-05 à 14 40 30

Expected behavior

I need the popover to stay in its collisionBoundary element.

Capture d’écran 2023-05-05 à 14 45 33

Reproducible example

CodeSandbox Template

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-popover 1.0.5
React n/a 18.2.0
Browser Chrome 112.0.5615.137

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions