diff options
author | Noah Loomans <noahloomans@gmail.com> | 2017-01-11 12:33:04 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2017-01-11 12:33:04 +0100 |
commit | 659ebdaa3cad319621a5bbd4fe9c009ceed2eb27 (patch) | |
tree | 95f4eb4dc5b4333a492cc3233174f86287b6708c /public/javascripts/search.js | |
parent | b64a31f1a31469e411945ce4f500fc11797c3406 (diff) | |
parent | 478352e5e7c449bbac5d969623ebd291223256d8 (diff) |
Merge branch 'beta' of github.com:nloomans/rooster-mml into beta
Diffstat (limited to 'public/javascripts/search.js')
-rw-r--r-- | public/javascripts/search.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/public/javascripts/search.js b/public/javascripts/search.js index 3f223ec..a07d6dd 100644 --- a/public/javascripts/search.js +++ b/public/javascripts/search.js @@ -13,13 +13,14 @@ self._nodes = { } self.submit = function () { - self._nodes.input.blur() - document.body.classList.remove('week-selector-not-visible') // Safari bug - const selectedItem = autocomplete.getSelectedItem() + if (selectedItem == null) return console.log(selectedItem) + self._nodes.input.blur() + document.body.classList.remove('week-selector-not-visible') // Safari bug + self.emit('search', selectedItem) } |