Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit ed1d98a

Browse files
samoussfrancoischalifour
authored andcommitted
fix(InstantSearch): disable autofocus (#257)
This PR disable the `autofocus` option for InstantSearch. When you are working on an App or on CodeSandbox the SearchBox get the focus on each reload. It's a bit frustrating.
1 parent 24b1935 commit ed1d98a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

scripts/__snapshots__/e2e-templates.test.js.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2912,6 +2912,7 @@ const search = instantsearch({
29122912
search.addWidget(
29132913
instantsearch.widgets.searchBox({
29142914
container: '#searchbox',
2915+
autofocus: false,
29152916
placeholder: 'Search placeholder',
29162917
})
29172918
);

src/templates/InstantSearch.js/src/app.js.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const search = instantsearch({
99
search.addWidget(
1010
instantsearch.widgets.searchBox({
1111
container: '#searchbox',
12+
autofocus: false,
1213
{{#if searchPlaceholder}}
1314
placeholder: '{{searchPlaceholder}}',
1415
{{/if}}

0 commit comments

Comments
 (0)