From cf9767f5db7db69481b7d3d16dfc0306ad074a95 Mon Sep 17 00:00:00 2001
From: Arie Peterson <arie@greenhost.nl>
Date: Thu, 2 Mar 2023 13:50:57 +0100
Subject: [PATCH] Autofocus first login input field

---
 backend/web/static/base.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/backend/web/static/base.js b/backend/web/static/base.js
index 566f8db7..e7cab4a0 100644
--- a/backend/web/static/base.js
+++ b/backend/web/static/base.js
@@ -59,6 +59,9 @@ function flow_login() {
 
       var messages_html = render_messages(data);
       $('#contentMessages').html(messages_html);
+
+      $('#totp_code').focus();
+      $('#identifier').focus();
     },
     complete: function (obj) {
       // If we get a 410, the flow is expired, need to refresh the flow
-- 
GitLab