github / github/auto-complete-element
Dropdown does not close on all blur events
- Langage dominant
- JavaScript
- Étoiles
- 407
- Forks
- 57
- Merge moyen
- 1 j 7 h
- PR mergées (30 j)
- 5
Description
We recently moved our application to this library from twitter-typeahead and have run into an issue where the results dropdown will only close when a selection is made. If a user clicks away from the input or tabs to the next form item the dropdown remains open.
This is inconvenient when a value for the field is already set and does not need to be changed. The user accidentally clicks the input or is tabbing through the page and the dropdown opens from the focus event, visually blocking the next form fields until the user makes the selection again.
Is this dropdown behavior intended? If so, could a prop be added so that implementers can turn it on or off?
If it isn't intended behavior, I think changing [this line](https://github.com/github/auto-complete-element/blob/main/src/autocomplete.ts#L250) to `this.interactingWithList = false` or possibly just removing that line altogether would fix things.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez à la ligne 250 de src/autocomplete.ts et suivez la manière dont l’état d’interaction de blur, focus et list contrôle le dropdown. Confirmez le comportement attendu lors d’un clic à l’extérieur et lors de l’utilisation de la touche Tab, puis vérifiez que le dropdown se ferme dans les deux cas sans perturber le comportement de sélection.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 55/100