]> git.cworth.org Git - lmno-server/commitdiff
Add some autofocus attributes to several forms master
authorCarl Worth <cworth@cworth.org>
Sat, 19 Sep 2020 21:41:45 +0000 (14:41 -0700)
committerCarl Worth <cworth@cworth.org>
Sat, 19 Sep 2020 21:41:45 +0000 (14:41 -0700)
Just trying to make things a little more friendly, (so that, a page
with a single form that has a single text field loads with that field
having focus already).

templates/choose-nickname.html
templates/empires-game.html
templates/login.html

index 9817b1d901ad776949a137aec31599fad600f6ea..f35abb607ad12ff3e5718e058cde3ba15cd8cd86 100644 (file)
@@ -41,7 +41,7 @@
            {% else %}
            required
            {% endif %}
-           >
+           autofocus>
   </div>
 
   <div class="form-field large">
index 3eb63385894abe2ac5495eed16410da41f285605..b1d6b7a058ea2dc57ddebd8e0d1a499a04b76940 100644 (file)
@@ -50,7 +50,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 57673168aa9962e329551d2b7dac8340e95c83d2..489870d776928d2ed1dde93adf52f8298d596cb5 100644 (file)
@@ -40,7 +40,7 @@ function lmno_login(form) {
 <form id="login-form" onsubmit="lmno_login(this); return false">
   <div class="form-field large">
     <label for="username">Username</label>
-    <input type="text" id="username" required>
+    <input type="text" id="username" required autofocus>
   </div>
 
   <div class="form-field large">