aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/main.js
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2016-12-14 12:40:20 +0100
committerNoah Loomans <noahloomans@gmail.com>2016-12-14 12:40:20 +0100
commit4d1c0fe2b6bbb180bf86c1195e1c80a4769d61e6 (patch)
tree00bac65b4e64e71732b3fa45f77b7bd1154341e1 /public/javascripts/main.js
parent819f3dd2088777c4d84a707b4bd62559382f36f5 (diff)
auto focus input on page load
Diffstat (limited to 'public/javascripts/main.js')
-rw-r--r--public/javascripts/main.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/public/javascripts/main.js b/public/javascripts/main.js
index 9214d05..de29a5d 100644
--- a/public/javascripts/main.js
+++ b/public/javascripts/main.js
@@ -16,6 +16,8 @@ if (favorite.get() != null) {
state.selectedItem = favorite.get()
favorite.update(state.selectedItem)
schedule.viewItem(weekSelector.getSelectedWeek(), state.selectedItem)
+} else {
+ search.focus()
}
search.on('search', function (selectedItem) {