From: Carl Worth <cworth@cworth.org>
Date: Sat, 19 Sep 2020 21:41:09 +0000 (-0700)
Subject: Add some autofocus attributes
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;p=lmno.games

Add some autofocus attributes

Just trying to make the games a little more keyboard friendly.
---

diff --git a/empires/game.html b/empires/game.html
index da7e730..d9de6a9 100644
--- a/empires/game.html
+++ b/empires/game.html
@@ -62,7 +62,7 @@
         <form id="register-form" onsubmit="register(this); return false">
           <div class="form-field large">
             <label for="character">Character name</label>
-            <input type="text" id="character" autocomplete="off" required>
+            <input type="text" id="character" autocomplete="off" required autofocus>
           </div>
 
           <div class="form-field large">
diff --git a/index.html b/index.html
index 3dd4a18..8742712 100644
--- a/index.html
+++ b/index.html
@@ -35,7 +35,8 @@
                  placeholder="Enter a 4-letter Game Code"
                  oninput="this.value = this.value.toUpperCase()"
                  autocomplete="off"
-                 required>
+                 required
+                 autofocus>
         </div>
 
         <div class="form-field large">