-
-
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
[ButtonBase] Fix space handling for non native button elements #19784
Conversation
@oliviertassinari P.S. I've tested this changes in context of #19724 and it worked. |
Details of bundle changes.Comparing: 08e7bf5...4e175e6
|
This PR is not related to #19783 since BreadcrumbsCollapsed isn't using ButtonBase. |
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.
I have updated the pull request description with a codesandbox to present the issue. We can observe different handling of the space key interaction.
I have also updated the tests to make sure we assert the keydown is preventDefault.
Given that @eps1lon has more context on the logic, the outcome of the effort is on his hands now.
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.
Small nit about the test description. The rest looks fine.
Awesome, one great addition to the logic of the ButtonBase :D |
The bug can be reproduced on https://codesandbox.io/s/lively-morning-0nbh5. Compare the different behavior between the native button and the button base.