]> git.joonet.de Git - adminer.git/commitdiff
Autofocus SQL textarea
authorJakub Vrana <jakub@vrana.cz>
Thu, 20 May 2010 20:50:35 +0000 (22:50 +0200)
committerJakub Vrana <jakub@vrana.cz>
Fri, 21 May 2010 18:30:54 +0000 (20:30 +0200)
adminer/sql.inc.php

index 91389ea70fadf43e5a69c017f8e340e1752c018b..364c55d305a45e2820b729200857d8f40a90db10 100644 (file)
@@ -137,6 +137,7 @@ if ($_POST) {
        $q = $history[$_GET["history"]];
 }
 textarea("query", $q, 20);
+echo ($_POST ? "" : "<script type='text/javascript'>document.getElementsByTagName('textarea')[0].focus();</script>\n");
 ?>
 <p>
 <input type="hidden" name="token" value="<?php echo $token; ?>">