Add some autofocus attributes master
authorCarl Worth <cworth@cworth.org>
Sat, 19 Sep 2020 21:41:09 +0000 (14:41 -0700)
committerCarl Worth <cworth@cworth.org>
Sat, 19 Sep 2020 21:41:09 +0000 (14:41 -0700)
Just trying to make the games a little more keyboard friendly.

empires/game.html
index.html

index da7e73060340afb69b562fc004adc25cdb6d7f7e..d9de6a9f2cef981e51b51d6bb9413a8b52fddf87 100644 (file)
@@ -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">
index 3dd4a18158396a471b3e07ea46e80dbe2574c183..87427126a6324a0fae75bf9fbc6b8b7d803a21da 100644 (file)
@@ -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">