Fix cursor moving while navigating search suggestions (#3566)

This commit is contained in:
absidue 2023-05-21 15:50:27 +02:00 committed by GitHub
parent 11fb055a72
commit 3e543aeb24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -230,6 +230,7 @@ export default defineComponent({
this.searchState.showOptions = true
const isArrow = event.key === 'ArrowDown' || event.key === 'ArrowUp'
if (isArrow) {
event.preventDefault()
if (event.key === 'ArrowDown') {
this.searchState.selectedOption = (this.searchState.selectedOption + 1) % this.visibleDataList.length
} else if (event.key === 'ArrowUp') {