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

[Modal + Select] Using keyboard Esc while Modal's Select is open should not close the Modal #327

Open
rh-meowsa opened this issue Apr 17, 2024 · 1 comment
Labels
bug 🐛 Something doesn't work component: modal This is the name of the generic UI component, not the React module! component: select This is the name of the generic UI component, not the React module!

Comments

@rh-meowsa
Copy link

rh-meowsa commented Apr 17, 2024

Steps to reproduce

Link to live example: https://codesandbox.io/p/sandbox/fervent-wiles-4htkjx?file=%2Fsrc%2FDemo.tsx%3A13%2C57
Steps:

  1. Create a modal and add a Select field inside it
  2. Open modal
  3. Open the Select dropdown
  4. Press Esc on the keyboard

Current behavior

Exits the Modal

Expected behavior

Exits only the Select (just like mui-material)

Context

Creating a form inside a modal for user to fill out and submit.

Your environment

npx @mui/envinfo

System:
OS: macOS 14.4.1
Binaries:
Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
pnpm: 8.6.11 - /opt/homebrew/bin/pnpm
Browsers:
Chrome: 123.0.6312.124
Edge: Not Found
Safari: 17.4.1
npmPackages:
@mui/base: 5.0.0-beta.37 => 5.0.0-beta.37
@types/react: 18.2.42 => 18.2.42
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0

using Chrome 123.0.6312.124

Search keywords: modal, select, escape, keyboard

Search keywords:

@rh-meowsa rh-meowsa added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Apr 17, 2024
@danilo-leal danilo-leal transferred this issue from mui/material-ui Apr 17, 2024
@danilo-leal danilo-leal changed the title [mui-base][Modal + Select] Using keyboard Esc while Modal's Select is open should not close the Modal [Modal + Select] Using keyboard Esc while Modal's Select is open should not close the Modal Apr 17, 2024
@danilo-leal danilo-leal added component: select This is the name of the generic UI component, not the React module! component: modal This is the name of the generic UI component, not the React module! labels Apr 17, 2024
@michaldudak
Copy link
Member

Your reproduction doesn't show the Modal. I can see what the issue is about, but could you please correct it for completeness?

We are currently redesigning Base UI components (with a different customization API), and we should tackle the Select around June (see https://github.com/orgs/mui/projects/1/views/13). We'll work on fixing this then.

@michaldudak michaldudak added bug 🐛 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Apr 19, 2024
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: modal This is the name of the generic UI component, not the React module! component: select This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

3 participants