Skip to content

Commit f834d62

Browse files
committed
Auto focus on username (login form) and one-time passcode (2fa form)
1 parent c70c260 commit f834d62

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/resources/templates/fragments/loginform.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@
8686
th:field="*{username}"
8787
th:accesskey="#{screen.welcome.label.email.accesskey}"
8888
th:value="${@casThymeleafLoginFormDirector.getLoginFormUsername(#vars)}"
89-
autocomplete="off" />
89+
autocomplete="off"
90+
autofocus />
9091
<label for="username" class="mdc-floating-label" th:utext="#{screen.welcome.label.email}"></label>
9192
</div>
9293
</section>

src/main/resources/templates/fragments/totploginform.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@
8080
maxlength="6"
8181
th:accesskey="#{screen.twofactor.label.onetimepassword.accesskey}"
8282
th:field="*{oneTimePassword}"
83-
autocomplete="off" />
83+
autocomplete="off"
84+
autofocus />
8485
<label for="username" class="mdc-floating-label" th:utext="#{screen.twofactor.label.onetimepassword}"></label>
8586
</div>
8687
</div>

0 commit comments

Comments
 (0)