Skip to content

Commit f7906ae

Browse files
authored
only autofocus search form on hero header (#10489)
fixes #9701 fixes #10480
1 parent df1bfb5 commit f7906ae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/components/header.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
The Rust community’s crate registry
1111
</h1>
1212

13-
<SearchForm @size={{if @hero "big"}} />
13+
<SearchForm @size={{if @hero "big"}} @autofocus={{@hero}} />
1414
</div>
1515

1616
<nav local-class='nav'>

app/components/search-form.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
placeholder="Type 'S' or '/' to search"
2727
value={{this.header.searchValue}}
2828
oninput={{this.updateSearchValue}}
29-
autofocus="autofocus"
29+
autofocus={{@autofocus}}
3030
required
3131
aria-label="Search"
3232
data-test-search-input

0 commit comments

Comments
 (0)