Просмотр исходного кода

Merge branch 'master' of https://github.com/asciimoo/searx

pw3t 11 лет назад
Родитель
Сommit
04e7075c88
2 измененных файлов: 2 добавлений и 2 удалений
  1. 1
    1
      searx/static/js/searx.js
  2. 1
    1
      searx/templates/search.html

+ 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
         }

+ 1
- 1
searx/templates/search.html Просмотреть файл

1
 <form method="post" action="/" id="search_form">
1
 <form method="post" action="/" id="search_form">
2
 <div id="search_wrapper">
2
 <div id="search_wrapper">
3
-    <input type="text" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
3
+    <input type="text" id="q" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
4
     <input type="submit" value="" id="search_submit" />
4
     <input type="submit" value="" id="search_submit" />
5
 </div>
5
 </div>
6
     <div>
6
     <div>