diff options
author | Noah Loomans <noahloomans@gmail.com> | 2016-12-09 13:50:58 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2016-12-09 13:50:58 +0100 |
commit | bd86bfa5de79b0d098a5ea7540b0717f195825ff (patch) | |
tree | 6d9efd50bbd4eabe15e5572fbdb58aa51b6f75ad /public/javascripts/search.js | |
parent | 1260c2788c56f8add0cad9ba758573e25b18b378 (diff) |
removed autocomplete.show & hide function
Diffstat (limited to 'public/javascripts/search.js')
-rw-r--r-- | public/javascripts/search.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/public/javascripts/search.js b/public/javascripts/search.js index d98c4fb..dd22f11 100644 --- a/public/javascripts/search.js +++ b/public/javascripts/search.js @@ -15,10 +15,10 @@ self.submit = function () { self._nodes.input.blur() const selectedItem = autocomplete.getSelectedItem() - console.log(selectedItem) + self._nodes.input.value = selectedItem.value iframe.viewItem(0, selectedItem) - autocomplete.hide() + autocomplete.removeAllItems() } self._handleSubmit = function (event) { @@ -50,9 +50,5 @@ autocomplete.events.on('select', self.submit) self._nodes.search.addEventListener('submit', self._handleSubmit) self._nodes.input.addEventListener('input', self._handleTextUpdate) -self._nodes.input.addEventListener('focus', autocomplete.show) - -// TODO: hide on escape key press -// self._nodes.input.addEventListener('blur', autocomplete.hide) module.exports = self |