Browse Source

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

dalf 11 years ago
parent
commit
b70b0775f3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      searx/static/js/searx.js

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