[ButtonBase] Fix space handling for non native button elements#19784
[ButtonBase] Fix space handling for non native button elements#19784oliviertassinari merged 3 commits intomui:masterfrom
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. |
oliviertassinari
left a comment
There was a problem hiding this comment.
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.
eps1lon
left a comment
There was a problem hiding this comment.
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.