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

[Bug] Confirm modal has wrong z-index relative to classic modal #3154

Closed
7iomka opened this issue Dec 9, 2022 · 6 comments
Closed

[Bug] Confirm modal has wrong z-index relative to classic modal #3154

7iomka opened this issue Dec 9, 2022 · 6 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@7iomka
Copy link
Contributor

7iomka commented Dec 9, 2022

What package has an issue

@mantine/modals

Describe the bug

Hi.
See repo link.
When confirm modal is opened (triggered) from currently opened modal it is unaccessible because DOM location where confirm modal always placed is before classic modals

What version of @mantine/hooks page do you have in package.json?

latest

If possible, please include a link to a codesandbox with the reproduced problem

https://codesandbox.io/s/distracted-noyce-ls4zx1?file=/src/App.tsx

Do you know how to fix the issue

None

Are you willing to participate in fixing this issue and create a pull request with the fix

None

Possible fix

No response

@rtivital
Copy link
Member

rtivital commented Dec 9, 2022

All modals are built with Modal component, zIndex is the same. It is not possible to decide on library level which modal should go on top of other modals. You should manage this logic on your side – https://codesandbox.io/s/smoosh-cache-s793s8?file=/src/App.tsx

@7iomka
Copy link
Contributor Author

7iomka commented Dec 9, 2022

https://codesandbox.io/s/smoosh-cache-s793s8?file=/src/App.tsx

This is weird behaviour.
I mean, the last modal needed to be rendered in DOM after the previous one which is already rendered.
How other libraries resolve this issue under hood without this hacks on user side?

@rtivital
Copy link
Member

I suppose that other libraries do not provide modals manager

@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Dec 12, 2022
@rtivital
Copy link
Member

Fixed in 5.9.4 – @mantine/modals package now sets zIndex that is larger than Modal component zIndex

@imranbarbhuiya
Copy link
Contributor

This fix is causing issues in my site. I can't set anything with higher zindex than the modal even with a fixed zindex using the zindex props. I'm not using the modals provider but the Modal from mantine/core

@rtivital
Copy link
Member

rtivital commented Jan 1, 2023

Your issue is not related to this fix. Modal code was not changed. You can set zIndex prop to change Modal z-index: <Modal zIndex={1000} />.

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

No branches or pull requests

3 participants