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

Fix overriding body styles when multiple Dialogs are open #2821

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

Malinicz
Copy link
Contributor

@Malinicz Malinicz commented Dec 4, 2024

Problem: when multiple Dialogs were open, body styles got overridden before all modals were closed. As a solution, every modal will keep its initial body class and top value and will restore it upon cleanup.

Before:

Screen.Recording.2024-12-04.at.11.07.03.mov

After:

Opening sibling modal and nested modal

Screen.Recording.2024-12-04.at.10.54.12.mov

Closing 2 modals at the same time (one is nested)

Screen.Recording.2024-12-04.at.11.03.05.mov

Style guide examples:

Screen.Recording.2024-12-04.at.11.59.17.mov

@bartoszlorek
Copy link
Contributor

@Malinicz could you check how this change works in the Style-Guide storybook, with examples there?

@Malinicz Malinicz merged commit 3861845 into master Dec 4, 2024
4 checks passed
@Malinicz Malinicz deleted the am/fix-body-no-scroll branch December 4, 2024 11:01
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

Successfully merging this pull request may close these issues.

4 participants