-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[MenuList] Add home
and end
key support
#14212
[MenuList] Add home
and end
key support
#14212
Conversation
At least the rationale for this change wasn't explained.
@oliviertassinari this change definitely works, the focus changes from the first ListItem on home and the last ListItem on end, but for whatever reason, the focus styles don't work without that extra bit of styling I inserted. So this technically works, but the user won't be able to see the first or last items being in focus. Would you like me to see if I can get it working without affecting any of the other styles? |
@dallin-christensen Oh right. I might have a fix. |
home
and end
key support
/* Styles applied to the `component`'s `focusVisibleClassName` property if `button={true}`. */ | ||
focusVisible: { | ||
backgroundColor: theme.palette.action.hover, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This style is almost 3 years old: 9a9ea7e.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. The changes look great! And all tests passing 👍
@dallin-christensen Well done |
Closes #13865
MenuList now supports the use of home and end keys, changing focus to the first and last ListItem.