primer / react

An implementation of GitHub's Primer Design System using React
https://primer.style/guides/react
MIT License
3.13k stars 535 forks source link

Autocomplete behavior discrepancy between Esc and clickoutside #4275

Open kre64 opened 8 months ago

kre64 commented 8 months ago

Description

The Autocomplete button has different behaviors when deleting characters off of a selection and pressing Esc vs clicking out of the Autocomplete's focus.

I was expecting this to be the same, so that users deleting characters off the end of their selection will be forced to reselect from the dropdown. E.g; if I select “alligator”, and delete r, o -- I want “alligat” to remain, or for the value of the Autocomplete input to be erased.

cc @pksjce for helping me understand what's going on with the component!

Image alt="recording of autocomplete input bug"

Steps to reproduce

  1. Enter text into the Autocomplete component
  2. Select any option from the dropdown list
  3. Delete a few characters off the end
  4. Click outside and watch the input autocomplete to the previous selection
  5. Optional, repeat steps 1-3, but press Esc and observed desired behavior

Version

v35.32.2

Browser

Chrome

github-actions[bot] commented 8 months ago

Uh oh! @kre64, the image you shared is missing helpful alt text. Check your issue body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

github-actions[bot] commented 8 months ago

Uh oh! @kre64, the image you shared is missing helpful alt text. Check your issue body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

github-actions[bot] commented 1 month ago

Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.