From 2ee89fd7cd867a28c8c695b417f502de198f7934 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Mon, 22 Jul 2024 15:18:41 +0300 Subject: [PATCH] Fix the autofocus of the login field --- session_login.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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";