diff options
author | Alexandre Flament <alex@al-f.net> | 2022-03-19 20:37:15 +0100 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2022-03-19 20:49:37 +0100 |
commit | 84340f56ec0b33019fe623eb1ddf3742a874aabe (patch) | |
tree | e31136a619ddaa0d3b65bcf7b6bd99d141df9a38 /searx/templates/simple/search.html | |
parent | be8d2f494955949494afc4ad8a23a57785e85180 (diff) | |
download | searxng-84340f56ec0b33019fe623eb1ddf3742a874aabe.tar.gz searxng-84340f56ec0b33019fe623eb1ddf3742a874aabe.zip |
simple theme: JS version: the reset button clear the text
The <input type="reset"> introduced in the PR 894, restores the default value.
It works in the index page, but it doesn't work in the /search page:
the reset button restore the initial query.
This PR:
* fix the JS version: the reset button clear the text
* keep the clear button in the / page
* hide the clear button in the /search page
Diffstat (limited to 'searx/templates/simple/search.html')
-rw-r--r-- | searx/templates/simple/search.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/templates/simple/search.html b/searx/templates/simple/search.html index 8c64211e5..a26af3e5d 100644 --- a/searx/templates/simple/search.html +++ b/searx/templates/simple/search.html @@ -6,7 +6,7 @@ </a> <div class="search_box"> <input id="q" autofocus name="q" type="text" placeholder="{{ _('Search for...') }}" autocomplete="off" spellcheck="false" dir="auto" value="{{ q or '' }}"> - <button id="clear_search" type="reset" aria-label="{{ _('clear') }}"><span class="hide_if_nojs">{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('clear') }}</span></button> + <button id="clear_search" type="reset" aria-label="{{ _('clear') }}" class="hide_if_nojs"><span>{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('clear') }}</span></button> <button id="send_search" type="submit" aria-label="{{ _('search') }}"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('search') }}</span></button> </div> {% set display_tooltip = true %} |