-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Dialog] Side effects (body overflow hidden property) #897
Comments
+1 I'm having this issue right now because I'm managing myself if the Dialog is in the dom or not. The issue is inside de |
+1 |
Im having the same issue, when I overlay many Dialogs and travel to a different path, the overflow hidden property on the body doesnt get removed even if I update the boolean property of the open Dialog KEY value. |
I would like to suggest a following change,
The
Dialog
component sets the<body>
style asoverflow: hidden;
. And on dismiss, this style rule is dismissed.But if the component is removed from DOM while Dialog was being shown, it renders the whole body non-scrollable due to the above style.
I would suggest a
componentWillUnmount
as follows,or to be more independent, the
componentDidMount
lifecycle function can store the original state of the body style and on unmount, that style can be restored.The text was updated successfully, but these errors were encountered: