Skip to content

Commit e2b8a21

Browse files
refactor: remove navigate to exact on enter
1 parent 97861a1 commit e2b8a21

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

app/pages/search.vue

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -573,24 +573,6 @@ watch(displayResults, results => {
573573
})
574574
575575
function handleResultsKeydown(e: KeyboardEvent) {
576-
// If the active element is an input, navigate to exact match or wait for results
577-
if (e.key === 'Enter' && document.activeElement?.tagName === 'INPUT') {
578-
// Get value directly from input (not from route query, which may be debounced)
579-
const inputValue = (document.activeElement as HTMLInputElement).value.trim()
580-
if (!inputValue) return
581-
582-
// Check if first result matches the input value exactly
583-
const firstResult = displayResults.value[0]
584-
if (firstResult?.package.name === inputValue) {
585-
pendingEnterQuery.value = null
586-
return navigateToPackage(firstResult.package.name)
587-
}
588-
589-
// No match yet - store input value, watcher will handle navigation when results arrive
590-
pendingEnterQuery.value = inputValue
591-
return
592-
}
593-
594576
if (totalSelectableCount.value <= 0) return
595577
596578
const elements = getFocusableElements()

0 commit comments

Comments
 (0)