mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 10:32:21 +02:00
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
This commit is contained in:
parent
be8d2f4949
commit
84340f56ec
3 changed files with 7 additions and 2 deletions
|
@ -31,10 +31,11 @@
|
|||
|
||||
// update status, event listener
|
||||
updateClearButton();
|
||||
cs.addEventListener('click', function () {
|
||||
cs.addEventListener('click', function (ev) {
|
||||
qinput.value = '';
|
||||
qinput.focus();
|
||||
updateClearButton();
|
||||
ev.preventDefault();
|
||||
});
|
||||
qinput.addEventListener('keyup', updateClearButton, false);
|
||||
}
|
||||
|
|
|
@ -125,6 +125,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
html.no-js #clear_search.hide_if_nojs {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#q,
|
||||
#send_search {
|
||||
display: block !important;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue