question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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:

  1. Tab in to the Autocomplete in the example.
  2. Hit the Escape key.
  3. Note the Chips are still there.
  4. Click on the clear icon in the Autocomplete component.
  5. 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
yann120commented, Feb 26, 2020

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 👍

2reactions
jcafierocommented, Feb 18, 2020

@chaudharykiran that’s fine with me. Yes, that is the desired behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Autocomplete] Cannot delete multiple Chips with Escape ...
The issue is present in the latest release. I have searched the issues of this repository and believe that this is not a...
Read more >
Clearing multiple chips from Material-UI Autocomplete on ...
I have a Form that contains several React Material Autocomplete (multi-select with Chips) ... I can't figure out how to remove them.
Read more >
Autocomplete API - Material UI
Name Type Default options * array renderInput * func autoComplete bool false
Read more >
How to remove a username from Chrome AutoFill
If you want to delete all autofill entries and saved text, follow these ... Click the three dots icon at the right beside...
Read more >
Escape key not working | MacOS Monterrey 12.0.1
I am not able to use my Escape (Esc) key after upgrading to MacOS Monterrey 12.0.1. I am confident that it is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found