Преглед изворни кода

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