Add autofocus to search input fields #194

This commit is contained in:
pluja 2021-02-23 15:06:04 +01:00
parent 39fb6294d7
commit 5770913103
2 changed files with 8 additions and 8 deletions

View File

@ -6,7 +6,7 @@
{{ form.hidden_tag() }}
<p>
{{ form.username.label }}<br>
{{ form.username(size=32) }}<br>
{{ form.username(size=32, autofocus=true) }}<br>
{% for error in form.username.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}

View File

@ -4,7 +4,7 @@
<div class="ui center aligned text container">
<form action="{{url_for('ytsearch', _method='GET')}}">
<div class="ui search">
<input class="prompt" name="q" type="text" placeholder="Search...">
<input class="prompt" name="q" type="text" placeholder="Search..." autofocus>
<select name="s" id="sort">
<option value="0">Relevance</option>
<option value="3">Views</option>