Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for popper-content-wrapper styling #2908

Open
eshelsil opened this issue May 18, 2024 · 0 comments
Open

Add support for popper-content-wrapper styling #2908

eshelsil opened this issue May 18, 2024 · 0 comments

Comments

@eshelsil
Copy link

eshelsil commented May 18, 2024

Feature request

Mainly I would like to request the support for using Popper while using an "absolute" floating strategy rather than fixed.
Eventually, the popper-content-wrapper will get styled with "position: fixed;" and there is no straight-forward way to change it.

Overview

In the codebase you can see that the strategy is hardcoded strategy: 'fixed',
which is the cause of the "position: fixed;" style.

So all components that use the popper must use this "fixed" strategy and it would be quite hard to choose the "absolute" strategy.

The main reason I had this need is due to the following issue:
Popover inside a scrollable container will appear outside of the container when exceeding its boundaries, even if its anchor is in the hidden overflown section of the container:

Issue Example on Codesandbox
Screenshot 2024-05-18 at 14 27 34

Who does this impact? Who is this for?

I think it might impact everyone

Additional context

In order to solve that issue I had to add {absolute: !important} to css because the data-radix-popper-content-wrapper's fixed position is set as a style:

.absolute-popover-container > [data-radix-popper-content-wrapper] {
  position: absolute !important;
  pointer-events: all;
}

Hack Solution Example in Codesandbox
Screenshot 2024-05-18 at 14 24 12

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

No branches or pull requests

1 participant