Make the login and signup screens focus on the first input

Fixes #4814
This commit is contained in:
Tom Hughes 2024-05-19 19:37:30 +01:00
parent 514836a497
commit 8da173e0f5
2 changed files with 2 additions and 1 deletions

View file

@ -35,7 +35,7 @@
<%= bootstrap_form_tag(:action => "login", :html => { :id => "login_form" }) do |f| %>
<%= hidden_field_tag("referer", h(params[:referer]), :autocomplete => "off") %>
<%= f.text_field :username, :label => t(".email or username"), :tabindex => 1, :value => params[:username] %>
<%= f.text_field :username, :label => t(".email or username"), :autofocus => true, :tabindex => 1, :value => params[:username] %>
<div class="row">
<div class="col">

View file

@ -53,6 +53,7 @@
t(".privacy_policy_url"),
:title => t(".privacy_policy_title"),
:target => :new)),
:autofocus => true,
:tabindex => 1 %>
<% else %>
<%= f.hidden_field :email %>