Skip to content

Commit 736ac2c

Browse files
committed
feat: focus search input by default
1 parent 1218453 commit 736ac2c

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
@@ -110,6 +110,7 @@ onKeyStroke(',', e => {
110110

111111
<input
112112
id="header-search"
113+
autofocus
113114
v-model="searchQuery"
114115
type="search"
115116
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)