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

Position of popovers contained within button group can break when clicking inside popover. #6992

Closed
1 of 2 tasks
linuspahl opened this issue Oct 17, 2024 · 3 comments · Fixed by Graylog2/graylog2-server#20952
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@linuspahl
Copy link

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.13.3

What package has an issue?

@mantine/core

What framework do you use?

create-react-app (CRA)

In which browsers you can reproduce the issue?

All

Describe the bug

In my case I have a simple Button.Group, which contains a Menu. The menu dropdown is not rendered within a portal (withinPortal={false}).

image

When I click on the menu dropdown instead of a menu item, the position of the dropdown changes. The same problem exists for other popovers like the Popover component.

position_problem

The reason seems to be that the button group has the following styling, which effects all focused child elements:

.m_80d6d844 :where(*):focus {
    position: relative;
    z-index: 1;
}

This overrides the position: absolute; of the popover.

If possible, include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/p/sandbox/mantine-react-template-forked-24mzvw?file=%2Fsrc%2FApp.tsx%3A25%2C1

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue
@linuspahl
Copy link
Author

A fix could be to define a more specific CSS selector, but I am not sure how the ideal selector should look like.

@vishal590
Copy link

I cam silver this issue. Can someone assign me?

@rtivital
Copy link
Member

rtivital commented Nov 8, 2024

Fixed in 7.13.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants