Skip to content

Commit 3f94d66

Browse files
committed
feat: focus search input by default
1 parent 0b0fdaa commit 3f94d66

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

app/components/AppHeader.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ onKeyStroke(',', e => {
107107

108108
<input
109109
id="header-search"
110+
autofocus
110111
v-model="searchQuery"
111112
type="search"
112113
name="q"

tests/interactions.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ test.describe('Search Pages', () => {
1010
await expect(firstResult).toBeVisible()
1111

1212
const searchInput = page.locator('input[type="search"]')
13-
// manually focus search
14-
await searchInput.focus()
1513

1614
// ArrowDown changes visual selection but keeps focus in input
1715
await page.keyboard.press('ArrowDown')

0 commit comments

Comments
 (0)