aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/search.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/javascripts/search.js')
-rw-r--r--public/javascripts/search.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/public/javascripts/search.js b/public/javascripts/search.js
index 8887ab2..fb40f78 100644
--- a/public/javascripts/search.js
+++ b/public/javascripts/search.js
@@ -21,8 +21,12 @@ self._handleSubmit = function (event) {
self.submit()
}
+autocomplete.events.on('select', self.submit)
+
self._nodes.search.addEventListener('submit', self._handleSubmit)
+self._nodes.input.addEventListener('focus', autocomplete.show)
-console.log(self)
+// TODO: hide on escape key press
+// self._nodes.input.addEventListener('blur', autocomplete.hide)
module.exports = self