Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/Dialog/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export const Dialog = ({
if (!isServerSideRendering) {
document.documentElement.style.overflow = open ? 'hidden' : '';
}
return () => {
document.documentElement.style.overflow = '';
};
}, [open]);

const handleClickOutside = (event) => {
Expand Down
3 changes: 3 additions & 0 deletions src/components/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export const Modal = ({
if (!isServerSideRendering) {
document.documentElement.style.overflow = open ? 'hidden' : '';
}
return () => {
document.documentElement.style.overflow = '';
};
}, [open]);

const { className: modalClassName, ...otherModalProps } = modalProps;
Expand Down
3 changes: 3 additions & 0 deletions src/components/StepperDialog/StepperDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export const StepperDialog = ({
if (!isServerSideRendering) {
document.documentElement.style.overflow = open ? 'hidden' : '';
}
return () => {
document.documentElement.style.overflow = '';
};
}, [open]);

// if the current step is handled from the outside, then (re-)set it on opening the dialog
Expand Down