We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 704987b commit ca1be35Copy full SHA for ca1be35
app/pages/search.vue
@@ -566,6 +566,14 @@ function handleResultsKeydown(e: KeyboardEvent) {
566
}
567
568
if (e.key === 'Enter') {
569
+ // If the active element is an input and there are results, navigate to the first result
570
+ if (document.activeElement?.tagName === 'INPUT' && displayResults.value?.length) {
571
+ return router.push({
572
+ name: 'package',
573
+ params: { package: displayResults.value?.[0]?.package.name.split('/') },
574
+ })
575
+ }
576
+
577
// Browser handles Enter on focused links naturally, but handle for non-link elements
578
if (document.activeElement && elements.includes(document.activeElement as HTMLElement)) {
579
const el = document.activeElement as HTMLElement
0 commit comments