瀏覽代碼

Set `autofocus` on inputs

JC Brand 7 年之前
父節點
當前提交
2203e9505a
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/templates/login_panel.html
  2. 1 1
      src/templates/register_panel.html

+ 1 - 1
src/templates/login_panel.html

@@ -8,7 +8,7 @@
         {[ if (authentication == LOGIN || authentication == EXTERNAL) { ]}
             <label>{{{__("Jabber ID:")}}}</label>
             <p class="form-help fade-in invalid-jid-msg error hidden">{{{_('Please enter a valid XMPP address')}}}</p>
-            <input type="text" name="jid" placeholder="{{{placeholder_username}}}">
+            <input autofocus type="text" name="jid" placeholder="{{{placeholder_username}}}">
             {[ if (authentication !== EXTERNAL) { ]}
                 <label>{{{__("Password:")}}}</label>
                 <input type="password" name="password" placeholder="{{{__('password')}}}">

+ 1 - 1
src/templates/register_panel.html

@@ -9,7 +9,7 @@
     	{{{default_domain}}}
     {[ } ]}
     {[ if (!default_domain) { ]}
-    	<input type="text" name="domain" placeholder="{{{domain_placeholder}}}">
+    	<input autofocus type="text" name="domain" placeholder="{{{domain_placeholder}}}">
         <input class="pure-button button-primary" type="submit" value="{{{label_register}}}">
     {[ } ]}
 </form>