Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui][Dialog] Keyboard scrolling doesn't work in fullscreen mode #42989

Open
jmealy opened this issue Jul 18, 2024 · 1 comment
Open
Assignees
Labels
bug 🐛 Something doesn't work component: dialog This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material

Comments

@jmealy
Copy link

jmealy commented Jul 18, 2024

Steps to reproduce

Link to live example: https://stackblitz.com/edit/react-mn6y3k-zhswqk?file=Demo.tsx

This applies to Dialog components with scroll='body'

Steps:

  1. Open the dialog with fullScreen=true
  2. Try to scroll using the keyboard.

Current behavior

You cannot scroll using the keyboard until you manually focus on the Dialog contents using a click or a tab.

Expected behavior

I would expect to be able to scroll using the keyboard straight away, as it is when fullScreen=false

Context

Trying to create an accessible full screen Dialog component

Your environment

npx @mui/envinfo
  System:
    OS: macOS 14.1
  Binaries:
    Node: 22.4.1 - /opt/homebrew/bin/node
    npm: 10.8.1 - /opt/homebrew/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 126.0.6478.182
    Edge: Not Found
    Safari: 17.1
  npmPackages:
    @emotion/react: ^11.11.0 => 11.11.1
    @emotion/styled: ^11.11.0 => 11.11.0
    @mui/base:  5.0.0-beta.28
    @mui/core-downloads-tracker:  5.15.1
    @mui/icons-material: ^5.14.20 => 5.15.1
    @mui/material: ^5.14.20 => 5.15.1
    @mui/private-theming:  5.15.1
    @mui/styled-engine:  5.15.1
    @mui/system:  5.15.1
    @mui/types:  7.2.11
    @mui/utils:  5.15.1
    @mui/x-date-pickers: ^5.0.20 => 5.0.20
    @types/react: ^18.2.75 => 18.2.75
    react: ^18.2.0 => 18.2.0
    react-dom: ^18.2.0 => 18.2.0
    typescript: ^5.4.5 => 5.4.5

Search keywords: fullscreen dialog keyboard scroll

@jmealy jmealy added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jul 18, 2024
@zannager zannager added the component: dialog This is the name of the generic UI component, not the React module! label Jul 18, 2024
@ZeeshanTamboli ZeeshanTamboli changed the title Keyboard scrolling doesn't work in fullscreen Dialog [material-ui][Dialog] Keyboard scrolling doesn't work in fullscreen mode Jul 24, 2024
@ZeeshanTamboli ZeeshanTamboli added bug 🐛 Something doesn't work package: material-ui Specific to @mui/material and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 24, 2024
@ZeeshanTamboli
Copy link
Member

It's a bug. It should work since it is programmatically focused using focus() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: dialog This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material
Projects
None yet
Development

No branches or pull requests

4 participants