Open mariajosealvarez opened 3 years ago
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Make sure your semantic-ui-css is up to date (latest ver) and that you dont double import at public index.html if you are using CRA
Yes, I'm using the last version of semantic-ui-css and semantic-ui-react
This is due to the size of the first modal being so large. There would actually be a significant amount of engineering needed I think to determine how to make a second modal stay centered once a larger modal was on screen that requires controlling. I do not think this time will be invested because the nested modal edge case is a bad UX pattern. There are lots of articles talking about how to remove these patterns from products by doing a quick "nested modals ux" search which will yield a lot of articles with strategies to avoid this pattern.
@brianespinosa I appreciate the reminder that modals shouldn't be overused, but their merits aside, this framework supports nested modals and the documentation provides examples for them, thus I think they should work.
I can help characterize this problem a bit more as I just ran into it.
At first I had a nested modal where everything was centered, horizontally and vertically as I intended. Then, I noticed that after the content in my first modal got long enough that it would scroll, now the 2nd modal was no longer vertically centered but it was now near the top of the screen.
As a workaround, I set <Modal.Content scrolling>
on the 1st modal and now the 2nd modal is again centered, both vertically and horizontally.
Bug Report
Steps
Create nested modals, adding a close icon on the second one:
You can use this snippet on modal examples:
Expected Result
When opening the nested modal, it should be centered
Actual Result
The nested modal appears at the top of the page and the close icon is cut off
Version
Last version
Testcase
https://codesandbox.io/s/semantic-ui-react-forked-k9cx5?file=/index.js