From 5e033b5f144e523b718109f2be07efc658bfac34 Mon Sep 17 00:00:00 2001
From: Julien Dessaux <julien.dessaux@adyxax.org>
Date: Sat, 12 Apr 2025 13:58:07 +0200
Subject: [PATCH] chore(webui): remove autofocus attributes in the redesigned
 pages

---
 pkg/webui/html/accounts.html | 3 +--
 pkg/webui/html/settings.html | 3 +--
 pkg/webui/html/states.html   | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/pkg/webui/html/accounts.html b/pkg/webui/html/accounts.html
index cca818f..80d699f 100644
--- a/pkg/webui/html/accounts.html
+++ b/pkg/webui/html/accounts.html
@@ -10,8 +10,7 @@
       <legend>New User Account</legend>
       <div class="grid-2">
         <label for="username" style="min-width:92px;">Username</label>
-        <input autofocus
-               {{ if or .UsernameDuplicate .UsernameInvalid }}class="error"{{ end }}
+        <input {{ if or .UsernameDuplicate .UsernameInvalid }}class="error"{{ end }}
                id="username"
                name="username"
                required
diff --git a/pkg/webui/html/settings.html b/pkg/webui/html/settings.html
index d96fc62..5d76eab 100644
--- a/pkg/webui/html/settings.html
+++ b/pkg/webui/html/settings.html
@@ -5,8 +5,7 @@
     <legend>Account Settings</legend>
     <div style="align-items:center; display:grid; grid-template-columns:1fr 1fr;">
       <label for="dark-mode">Dark mode</label>
-      <input autofocus
-             {{ if not .Settings.LightMode }}checked{{ end }}
+      <input {{ if not .Settings.LightMode }}checked{{ end }}
              id="dark-mode"
              name="dark-mode"
              type="checkbox"
diff --git a/pkg/webui/html/states.html b/pkg/webui/html/states.html
index 4358f3d..0282bc5 100644
--- a/pkg/webui/html/states.html
+++ b/pkg/webui/html/states.html
@@ -11,8 +11,7 @@
       <legend>New State</legend>
       <div class="grid-2">
         <label for="path">Path</label>
-        <input autofocus
-               {{ if or .PathDuplicate .PathError }}class="error"{{ end }}
+        <input {{ if or .PathDuplicate .PathError }}class="error"{{ end }}
                id="path"
                name="path"
                required