From 7141ba5172b3f6438e481a174ea7d133700aee6e Mon Sep 17 00:00:00 2001 From: fpunktk Date: Thu, 28 May 2015 20:17:24 +0200 Subject: [PATCH] only focus the input if it is empty --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index e20e4a9..1f3311e 100644 --- a/index.php +++ b/index.php @@ -119,13 +119,13 @@ function display_searchbuttons() { for ( kw in se ) { document.getElementById("searchbuttons").innerHTML += ' \n"; } - document.getElementById("querystring").focus(); } function parse_fragmentstring() { var fragmentstring = document.URL.substr( document.URL.split("#")[0].length + 1 ); if ( fragmentstring == "" ) { display_searchbuttons(); + document.getElementById("querystring").focus(); } else { fragmentarr = fragmentstring.replace("%20", "+").split("+"); if ( se[fragmentarr[0]] ) { -- 2.30.2