github / github/auto-complete-element
Dropdown does not close on all blur events
- Lingua principale
- JavaScript
- Stelle
- 407
- Fork
- 57
- Merge medio
- 1g 7h
- PR unite (30g)
- 5
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dalla riga 250 di src/autocomplete.ts e segui come lo stato di interazione di blur, focus e list controlla il dropdown. Conferma il comportamento previsto quando si fa clic all’esterno e quando si usa il tabulatore, quindi verifica che il dropdown si chiuda in entrambi i casi senza compromettere il comportamento di selezione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100