summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorAlexandre FLAMENT <alexandre.flament@hesge.ch>2022-06-02 20:33:31 +0000
committerAlexandre FLAMENT <alexandre.flament@hesge.ch>2022-06-02 20:33:31 +0000
commitfbad93e808fec53bdc94199c77ce5e57aad42a73 (patch)
tree8245825666470dc4a140a8210d4508b9397dc6fb /searx
parent96dc4369d535dc20178a3e7df793c8f2427d2c79 (diff)
downloadsearxng-fbad93e808fec53bdc94199c77ce5e57aad42a73.tar.gz
searxng-fbad93e808fec53bdc94199c77ce5e57aad42a73.zip
Theme: enable autofocus of #q only on the index page and when the width > 50em
Related to #1270
Diffstat (limited to 'searx')
-rw-r--r--searx/static/themes/simple/src/js/main/search.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/static/themes/simple/src/js/main/search.js b/searx/static/themes/simple/src/js/main/search.js
index 20e58e0fe..b96cf499d 100644
--- a/searx/static/themes/simple/src/js/main/search.js
+++ b/searx/static/themes/simple/src/js/main/search.js
@@ -86,7 +86,7 @@
qinput.addEventListener('focus', placeCursorAtEndOnce, false);
- if (!isMobile) {
+ if (!isMobile && document.querySelector('.index_endpoint')) {
qinput.focus();
}
}