site: rework {up,down} arrow handling

Allows it to work when setting the cursor via the pointer.
This commit is contained in:
Lucas Gabriel Vuotto 2025-04-28 14:19:01 +00:00
parent 301b28e7e1
commit cc25efc5f4
2 changed files with 21 additions and 12 deletions

View file

@ -13,8 +13,8 @@
@input.debounce="fetchSuggestionsOnInput"
@keydown.tab="autocompleteItem"
@keydown.enter="autocompleteItem"
@keydown.up.prevent="previousItem"
@keydown.down.prevent="nextItem"
@keydown.up.prevent="moveActiveItemBackward"
@keydown.down.prevent="moveActiveItemForward"
@keydown.escape="open = false">
<ul
x-ref="suggestions"