Skip to content

Commit

Permalink
Fix the autofocus of the login field
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Jul 22, 2024
1 parent 42a4a25 commit 2ee89fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion session_login.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ if ($in{'twofactor_msg'} && $miniserv{'twofactor_provider'}) {
my $autocomplete = $gconfig{'noremember'} ? "off" : "username";
print &ui_textbox("user", $in{'failed'}, 20, 0, undef,
"autocomplete='$autocomplete' autocorrect='off' autocapitalize='none' ".
"placeholder='$theme_text{'theme_xhred_login_user'}'", 'session_login', 1);
"placeholder='$theme_text{'theme_xhred_login_user'}'" .
(!$in{"failed"} ? ' autofocus' : ''), 'session_login', 1);

print '<span class="input-group-addon"><i class="fa fa-fw fa-user"></i></span>' . "\n";
print '</div>' . "\n";
Expand Down

0 comments on commit 2ee89fd

Please sign in to comment.