Browse Source

Theme: enable autofocus of #q only on the index page and when the width > 50em

Related to #1270
Alexandre FLAMENT 2 years ago
parent
commit
fbad93e808
1 changed files with 1 additions and 1 deletions
  1. 1 1
      searx/static/themes/simple/src/js/main/search.js

+ 1 - 1
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();
       }
     }