[autocomplete] Popup causes undesirable page scroll on mobile
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Steps to reproduce
Steps:
- Open this link to live example: https://codesandbox.io/p/devbox/dreamy-jerry-x84wzk
- Click the Filter button to toggle the Drawer
- Ensure that scrolling on the drawer does not move the document body
- Click into one of the Autocomplete component
- Scrolling anywhere on the screen scrolls the entire document
https://github.com/user-attachments/assets/6483dce9-d513-4b52-8d3d-09dba73808df
I first encountered this issue in v5, but am able to reproduce it in v7 as well - https://codesandbox.io/p/sandbox/react-hook-form-mui-5-v7-controller-ts-10d64d
Current behavior
The entire document scrolls.
Expected behavior
Only the drawer/autocomplete should scroll.
Context
No response
Your environment
npx @mui/envinfo
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Search keywords: drawer, autocomplete
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.
Research direction
Reproduce the problem using the linked CodeSandbox examples, focusing on the interaction between the Drawer and Autocomplete on mobile. Trace the scroll behavior from those components and verify the fix by confirming that scrolling within the Autocomplete or Drawer no longer scrolls the document body.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100