added autofocus and onfocus on the searchbar

This commit is contained in:
Pieter Lambrecht 2022-03-18 18:11:44 +01:00
parent edd03e785c
commit dc355e827d

View File

@ -5,7 +5,11 @@
aria-label="Search"
placeholder="Search"
class="form-control"
value="{{ request.GET.q }}"
value=""
{% if request.GET.q %}
autofocus
onfocus="this.value = '{{ request.GET.q|escapejs }}';"
{% endif %}
/>
<input name="obj_type" hidden type="text" class="search-obj-type" />