Link to live example: Sandbox example (Just click on the Select component)
Steps:
Inside a component with overflow = hidden create a Select using Select and MenuItem components
Make Select component scrollIntoView on focus
Observe that Menus get away from the Select component although disableScrollLock should stop it
Current behavior
The MenuItems get away from the select
I use overflow=hidden for the main parent component of my app, so there's nothing I can easily change
Expected behaviour
When disableScrollLock is true, MenuItems should always stick to the Select component, regardless of the style and properties of the parent components.
Context
No response
Your environment
I use Chrome Version 124, but same behaviour with Firefox and Safari
Steps to reproduce
Link to live example: Sandbox example (Just click on the Select component)
Steps:
overflow = hidden
create a Select using Select and MenuItem componentsscrollIntoView
on focusdisableScrollLock
should stop itCurrent behavior
The MenuItems get away from the select I use overflow=hidden for the main parent component of my app, so there's nothing I can easily change
Expected behaviour
When
disableScrollLock
istrue
, MenuItems should always stick to the Select component, regardless of the style and properties of the parent components.Context
No response
Your environment
I use Chrome Version 124, but same behaviour with Firefox and Safari
``` System: OS: macOS 14.4.1 Binaries: Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm pnpm: Not Found Browsers: Chrome: 125.0.6422.60 Edge: Not Found Safari: 17.4.1 npmPackages: @emotion/react: 11.11.1 @emotion/styled: 11.11.0 @mui/base: 5.0.0-beta.32 @mui/core-downloads-tracker: 5.15.5 @mui/icons-material: ^5.15.5 => 5.15.5 @mui/lab: ^5.0.0-alpha.165 => 5.0.0-alpha.165 @mui/material: ^5.15.5 => 5.15.5 @mui/private-theming: 5.15.5 @mui/styled-engine: 5.15.5 @mui/system: ^5.15.5 => 5.15.5 @mui/types: 7.2.13 @mui/utils: 5.14.18 @mui/x-data-grid: 6.18.7 @mui/x-data-grid-premium: ^6.18.7 => 6.18.7 @mui/x-data-grid-pro: 6.18.7 @mui/x-date-pickers: ^6.19.0 => 6.19.0 @mui/x-license-pro: ^6.10.2 => 6.10.2 @types/react: ^18.0.5 => 18.2.33 react: ^18.2.0 => 18.2.0 react-dom: ^18.2.0 => 18.2.0 styled-components: 5.3.11 typescript: ^5.4.5 => 5.4.5 ```npx @mui/envinfo
Search keywords: disableScrollLock