github / github/auto-complete-element

Dropdown does not close on all blur events

Đang mở
#136 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
407
Fork
57
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
5

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.