-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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][Menu] After opening Menu, it is not possible to refresh page by ctrl + R #43215
Comments
Could you provide a minimal reproduction? A live example would be ideal. You can start with this StackBlitz template. It works on the MUI site next.mui.com: issue-43215.mp4 |
Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information. |
@ZeeshanTamboli I just explored reason of this behavior. Looks that if MenuItem have content which start from R letter or any other letter then using shortcut with this letter won't work. You can see this issue also if you use attached by you this StackBlitz template. |
@JaniecMichal The You can stop the event from reaching the See the example here: https://stackblitz.com/edit/react-bdf3td-pldymk?file=Demo.tsx. |
@ZeeshanTamboli The fix does not work on mac - probably need to check for the metaKey instead of the ctrlKey |
Yup. |
Shouldn't it work like that by default tho? I can imagine this being an issue for more people |
Alright. I compared the Menu component with other libraries like React Aria, Radix UI, and even Base UI, which all support this feature. Maybe we should too, or wait until v7. I'd like to hear others' opinions. cc @aarongarciah @DiegoAndai @michaldudak
From what I found, no one has reported this issue since the Material UI Menu component was introduced. |
I'd consider this a bug. With the migration to Base UI in the horizon, I'm not sure we should be spending time on improving Menu. I'll get back to you soon. |
I added the bug label. Contributions are more than welcome! This is the part of the code that handles the typeahead: material-ui/packages/mui-material/src/MenuList/MenuList.js Lines 168 to 195 in f1a5b88
We should not prevent events that include modifier keys such as ctrl, meta, alt. For reference, here's the |
Added to the "Material UI with Base UI" milestone in case we don't get a contribution before it. |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note We value your feedback @JaniecMichal! How was your experience with our support team? |
Steps to reproduce
Link to live example: (required)
Steps:
Current behavior
This is weird case because we using this component in our apps and we have some places when ctrl + r after open Menu don't works. We have also places when the same component but rendered for different users ones works and ones not works
Expected behavior
Refreshing by keyboard shortcut should works always?
Context
Maybe it is caused by internal feature of Menu component that after click into key is searching item which match (by first letter)
Your environment
Search keywords: Menu, MenuItem, refresh, ctr + r
The text was updated successfully, but these errors were encountered: