소스 검색

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

dalf 11 년 전
부모
커밋
b70b0775f3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      searx/static/js/searx.js

+ 1
- 1
searx/static/js/searx.js 파일 보기

@@ -17,7 +17,7 @@
17 17
 
18 18
     addListener(w, 'load', function () {
19 19
         var qinput = d.getElementById('q');
20
-        if (qinput !== null) {
20
+        if (qinput !== null && qinput.value === "") {
21 21
             addListener(qinput, 'focus', placeCursorAtEnd);
22 22
             qinput.focus();
23 23
         }