diff --git a/session_login.cgi b/session_login.cgi index 2388a40cb..aa30c056d 100755 --- a/session_login.cgi +++ b/session_login.cgi @@ -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 '' . "\n"; print '' . "\n";