[Drawer] Resizing window with open drawer makes main content non-scrollable
Open
@siriwatknp is already working on this.
Since Apr 13, 2022.
scope: drawer
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
When switching the browser width between mobile & desktop, the main content is not any more scrollable.
Note that this not only happens when the viewport changes between mobile and non-mobile, but also when the Drawer is initialised with open = true state, but the viewport is in "desktop" width.
Expected behavior 🤔
Content is always scrollable, no matter if a Drawer has property open = true or not if Drawer is in "desktop" mode.
Steps to reproduce 🕹
Steps:
- Go to https://mui.com/material-ui/react-drawer/#responsive-drawer
- Resize window to "mobile" --> drawer is collapsed behind burger menu
- Click on burger menu --> drawer appears with gray backdrop, content disappears
- Reize window to "desktop" --> drawer stays visible on the left, and content re-appears on the right
- Now try to scroll the content. It doesn't work, as body has
overflow: hidden;style. Also note that body haspadding-right: 366px;style, which looks not good.
Context 🔦
No response
Your environment 🌎
Latest MUI version on Chrome.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.