Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[mod] the search text input gets the focus automatically only on the index page.

dalfb70b0775f306
diff --git a/searx/static/js/searx.js b/searx/static/js/searx.js
index 5eb880f65..7b224a17f 100644
--- a/searx/static/js/searx.js
+++ b/searx/static/js/searx.js
@@ -17,7 +17,7 @@
addListener(w, 'load', function () {
var qinput = d.getElementById('q');
- if (qinput !== null) {
+ if (qinput !== null && qinput.value === "") {
addListener(qinput, 'focus', placeCursorAtEnd);
qinput.focus();
}