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

Ability to style the Popover overlay #5231

Open
deebov opened this issue Oct 10, 2023 · 5 comments
Open

Ability to style the Popover overlay #5231

deebov opened this issue Oct 10, 2023 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed RAC

Comments

@deebov
Copy link
Contributor

deebov commented Oct 10, 2023

Provide a general summary of the feature here

Would be very useful to style the Popover overlay the same way as Modal and ModalOverlay.

🤔 Expected Behavior?

You should not be able to interact with outside elements while the popover is open.

😯 Current Behavior

If there are elements with zIndex set, you're able to click them while the popover is still open. That's due to the Popover Overlay not having any zIndex which makes it possible to click other elements with zIndex.

💁 Possible Solution

Either the popover overlay already comes with zIndex or an ability to customize the overlay.

🔦 Context

We have clickable elements with higher zIndex and if you try to close the popover by clicking outside, you can accidentally interact with an element with higher zIndex than the overlay.

💻 Examples

No response

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@devongovett devongovett added enhancement New feature or request RAC labels Oct 13, 2023
@reidbarber
Copy link
Member

Related to discussion in #5126. This would be nice to have, and since it's non-breaking it doesn't need to be added before RAC GA.

@Talor-A
Copy link

Talor-A commented Dec 1, 2023

hi @reidbarber , this is a niche blocker for us as well. we have an electron app we use the popovers in, and the overlays need this special style rule applied:

 -webkit-app-region: no-drag;

otherwise, window titlebars eat click events and prevent modals from being closed.

all we need is some way to target the underlay with styles, either by className, rendering a <Overlay /> element that replaces the built in one, or some other method as a workaround.

@devongovett
Copy link
Member

I think we could add an API similar to <ModalOverlay>, but for popovers. By default, <Popover> would include the overlay, but if you want to customize it, you could wrap it in a <PopoverOverlay>.

@deebov
Copy link
Contributor Author

deebov commented Dec 4, 2023

@devongovett That would be ideal!

@levrik
Copy link

levrik commented Sep 20, 2024

This is really needed as otherwise Popovers (Menus in our case) inside a Modal Dialog don't overlay the Modal Dialog which uses z-index as written in code examples from the documentation.

As a workaround I apply styles to [data-testid="underlay"] for now but TBH this feels hacky.

@github-project-automation github-project-automation bot moved this to ✏️ To Groom in RSP Component Milestones Nov 4, 2024
@LFDanLu LFDanLu moved this from ✏️ To Groom to 🩹 To Triage in RSP Component Milestones Nov 4, 2024
@snowystinger snowystinger added the help wanted Extra attention is needed label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed RAC
Projects
Status: 🩺 To Triage
Development

No branches or pull requests

6 participants