logo

searx

Unnamed repository; edit this file 'description' to name the repository.
commit: b1c6b0a3f15576722743fe49ab02cd80301fcfd9
parent: d2898b08187101aad477ef48c8ea7518cee8b925
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Fri,  3 Jan 2014 00:33:02 -0800

Merge pull request #14 from dalf/master

focus on search input

Diffstat:

searx/static/js/searx.js | 2+-
searx/templates/search.html | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/searx/static/js/searx.js b/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(); } diff --git a/searx/templates/search.html b/searx/templates/search.html @@ -1,6 +1,6 @@ <form method="post" action="/" id="search_form"> <div id="search_wrapper"> - <input type="text" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/> + <input type="text" id="q" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/> <input type="submit" value="" id="search_submit" /> </div> <div>