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

[data grid] GridActionsCellItem menu doesn't restore focus after escape #10675

Open
romgrk opened this issue Oct 14, 2023 · 2 comments
Open

[data grid] GridActionsCellItem menu doesn't restore focus after escape #10675

romgrk opened this issue Oct 14, 2023 · 2 comments
Labels
accessibility a11y component: data grid This is the name of the generic UI component, not the React module! feature: Keyboard editing Related to the pickers keyboard edition

Comments

@romgrk
Copy link
Contributor

romgrk commented Oct 14, 2023

Steps to reproduce

For GridActionsCellItem with showInMenu enabled:
Link to live example: https://mui.com/x/react-data-grid/accessibility/#density

Steps:

Go to the live example link.
Reach the DataGrid example.
Go to the last column.
Press/select the icon with the three dots.
Select any option in the menu or press esc.

Current behavior

Focus not restored

Expected behavior

Focus restored

Context

No response

Your environment

No response

Search keywords: keyboard shortcuts

@romgrk romgrk added status: waiting for maintainer These issues haven't been looked at yet by a maintainer accessibility a11y component: data grid This is the name of the generic UI component, not the React module! feature: Keyboard editing Related to the pickers keyboard edition and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 14, 2023
@github-project-automation github-project-automation bot moved this to 🆕 Needs refinement in MUI X Data Grid Oct 14, 2023
@lauri865
Copy link
Contributor

Focus is also lost when you trigger an action and it becomes disabled, e.g. in the bulk actions example (when you discard a row changes with keyboard):
https://mui.com/x/react-data-grid/recipes-editing/#bulk-editing

@Isaac1606
Copy link

Isaac1606 commented Oct 27, 2023

Following our conversation of #10241 I finally got the time to actually provide a live example for the bug where the menu keeps floating around after pressing enter key if the item is an anchor tag. You can see it in https://codesandbox.io/s/quirky-morning-h362vd.
This is a forked sandbox so please ignore everything except the actions column, see it for yourself, navigation works fine, you press enter in the three dots, the menu appears, press enter in the link option and nothing happens, do the same with your mouse and works fine.

@oliviertassinari oliviertassinari changed the title [datagrid] GridActionsCellItem menu doesn't restore focus after escape [data grid] GridActionsCellItem menu doesn't restore focus after escape Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y component: data grid This is the name of the generic UI component, not the React module! feature: Keyboard editing Related to the pickers keyboard edition
Projects
Status: 🆕 Needs refinement
Development

No branches or pull requests

3 participants