[Autocomplete] Cannot delete multiple Chips with Escape Key
See original GitHub issue- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
Currently, if you hit the Escape key while focused in a multi-select Autocomplete with the clearOnEscape
prop it will not clear the Chips from the window.
One behavior I did notice was that if there is still active text in the field, hitting the Escape Key twice would clear everything from the Autocomplete.
Expected Behavior 🤔
If you hit the Escape key while focused in a multi-select Autocomplete with the clearOnEscape
prop, it should clear the Chips, similar to how clicking on the ‘X’ icon will clear all of the Chips from the field. This behavior should be consistent whether or not there is partially filled text or not in the Autocomplete.
Steps to Reproduce 🕹
Here is a CodeSandbox: https://codesandbox.io/s/cranky-dhawan-2smfv?fontsize=14&hidenavigation=1&theme=dark
Steps:
- Tab in to the Autocomplete in the example.
- Hit the Escape key.
- Note the Chips are still there.
- Click on the clear icon in the Autocomplete component.
- Note that the Chips are deleted.
Context 🔦
This is an accessibility bug that should be resolved to give keyboard users the same experience.
Your Environment 🌎
Tech | Version |
---|---|
Material-UI | v4.9.2 |
React | latest |
Browser | Chrome |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top GitHub Comments
Hey @oliviertassinari , we fix it yesterday at Doctolib event with your advices. But we write a new test and we can’t make it pass… But we are working on it and try to understand why 👍
@chaudharykiran that’s fine with me. Yes, that is the desired behavior.