josefarias / hotwire_combobox

An accessible autocomplete for Ruby on Rails.
https://hotwirecombobox.com
MIT License
458 stars 30 forks source link

Async: Autocompleted portion sometimes jumps to conclusions #40

Closed josefarias closed 6 months ago

josefarias commented 6 months ago

On async comboboxes, when the turbo stream response takes too long to render, the autocompleted portion of the query can commit to the autocompleted value early.

For example, when on a slower device, if you type "al" in the YouTube example from the docs, the combobox will autocomplete "Aladdin" (as it should) but it will also deselect the autocompleted portion as if you had selected the "Aladdin" option.

This doesn't always happen. But when it does, it's confusing to the user.

Here's a video where I only type "mi" but the whole option is autocompleted and deselected automatically.

https://github.com/josefarias/hotwire_combobox/assets/31393016/ef633306-d248-4937-b0c7-f7167d357069

josefarias commented 6 months ago

This is still happening