Skip to content

Commit

Permalink
Merge pull request #4816 from tomhughes/login-focus
Browse files Browse the repository at this point in the history
Make the login and signup screens focus on the first input
  • Loading branch information
gravitystorm committed May 22, 2024
2 parents 994d641 + 8da173e commit 7ab920d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
1 change: 1 addition & 0 deletions app/views/users/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
t(".privacy_policy_url"),
:title => t(".privacy_policy_title"),
:target => :new)),
:autofocus => true,
:tabindex => 1 %>
<% else %>
<%= f.hidden_field :email %>
Expand Down

0 comments on commit 7ab920d

Please sign in to comment.