You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To prevent scrolling contents behind a dialog overlay, the body's overflow is removed and it receives a marginRight of the scrollbar's width.
However, if one dialog replaces another one, the body is updated with an additional paddingRight of the same width, causing a layout shift.
Expected behavior
The padding should not be set. Keeping it the margin should be sufficient.
Bug report
Current Behavior
To prevent scrolling contents behind a dialog overlay, the body's overflow is removed and it receives a
marginRight
of the scrollbar's width.However, if one dialog replaces another one, the body is updated with an additional
paddingRight
of the same width, causing a layout shift.Expected behavior
The padding should not be set. Keeping it the margin should be sufficient.
Reproducible example
CodeSandbox Template
Suggested solution
n/a
Additional context
This can be solved with using a timeout, but this only produces inconsistent results.
Your environment
The text was updated successfully, but these errors were encountered: