diff options
author | Noah Loomans <noahloomans@gmail.com> | 2016-12-14 12:40:20 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2016-12-14 12:40:20 +0100 |
commit | 4d1c0fe2b6bbb180bf86c1195e1c80a4769d61e6 (patch) | |
tree | 00bac65b4e64e71732b3fa45f77b7bd1154341e1 /public/javascripts/search.js | |
parent | 819f3dd2088777c4d84a707b4bd62559382f36f5 (diff) |
auto focus input on page load
Diffstat (limited to 'public/javascripts/search.js')
-rw-r--r-- | public/javascripts/search.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/public/javascripts/search.js b/public/javascripts/search.js index 8ae3043..7d80709 100644 --- a/public/javascripts/search.js +++ b/public/javascripts/search.js @@ -29,6 +29,10 @@ self.updateDom = function (selectedItem) { document.body.classList.add('searched') } +self.focus = function () { + self._nodes.input.focus() +} + self._handleSubmit = function (event) { event.preventDefault() self.submit() |