We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c2f734 commit ddedc56Copy full SHA for ddedc56
packages/material-ui/src/Modal/ModalManager.js
@@ -64,7 +64,10 @@ function handleContainer(containerInfo, props) {
64
// Improve Gatsby support
65
// https://css-tricks.com/snippets/css/force-vertical-scrollbar/
66
const parent = container.parentElement;
67
- const scrollContainer = parent.nodeName === 'HTML' ? parent : container;
+ const scrollContainer =
68
+ parent.nodeName === 'HTML' && window.getComputedStyle(parent)['overflow-y'] === 'scroll'
69
+ ? parent
70
+ : container;
71
72
restoreStyle.push({
73
value: scrollContainer.style.overflow,
0 commit comments