Autofocus user search input

Fixes #58
This commit is contained in:
Zed 2019-10-08 13:19:49 +02:00
parent a9f4961547
commit dfce77ee98

View file

@ -110,7 +110,8 @@ proc renderUserSearch*(users: Result[Profile]; prefs: Prefs): VNode =
tdiv(class="timeline-header"):
form(`method`="get", action="/search", class="search-field"):
hiddenField("kind", "userSearch")
genInput("q", "", users.query.text, "Enter username...", class="pref-inline")
genInput("q", "", users.query.text, "Enter username...",
class="pref-inline", autofocus=true)
button(`type`="submit"): icon "search"
renderSearchTabs(users.query)