floating-ui / floating-ui/popper.js.org

Overflowing popper

Open
#46 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
85
Forks
406
PR merge metrics
No merged PRs in 30d

Description

I'm using `@popperjs/core` version `2.5.3` to open my component under a dropdown. it works fine but when user opens the popper in small monitors the bottom of the popper will be cut off, so with `detectOverflow()` you can see the bottom of rect has a positive digit.
I want to open the popper in the middle of the screen so that the user can see the whole popper, I've spent a lot of time to figure out how to change the coordinate of the popper's rect to show it in the middle of the viewport but it seems there is no way to apply a computed coordinate base on the viewport to the popper that's just been opened. could you guide me a solution to address this issue?
thanks in advance.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.