aboutsummaryrefslogtreecommitdiff
path: root/src/client/react
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2018-03-21 18:27:13 +0100
committerNoah Loomans <noahloomans@gmail.com>2018-03-21 18:27:13 +0100
commit87fc845b89730f98a15a0b81f765a10a6f45838a (patch)
treeaaef7a8bf4694a9f8f716d8c0b72db475856c0a5 /src/client/react
parent93d3f491f0a0bff65e2bff37da1e24d1cbab2aea (diff)
Fix focus on page load
Diffstat (limited to 'src/client/react')
-rw-r--r--src/client/react/components/container/Search.js2
-rw-r--r--src/client/react/index.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/client/react/components/container/Search.js b/src/client/react/components/container/Search.js
index 991ef5b..a124b21 100644
--- a/src/client/react/components/container/Search.js
+++ b/src/client/react/components/container/Search.js
@@ -155,7 +155,7 @@ class Search extends React.Component {
/>
</div>
<input
- id="search__input"
+ id="searchInput"
onChange={event => dispatch({ type: 'SEARCH/INPUT_CHANGE', searchText: event.target.value })}
onKeyDown={this.onKeyDown}
value={searchText}
diff --git a/src/client/react/index.js b/src/client/react/index.js
index 95cf2ab..2443ced 100644
--- a/src/client/react/index.js
+++ b/src/client/react/index.js
@@ -63,4 +63,4 @@ ReactDOM.render(
// We only want to focus the input on page load. NOT on a in-javascript
// redirect. This is because that is when people usually want to start typing.
-document.querySelector('.search input').focus();
+document.querySelector('#searchInput').focus();