Autofocus password box on login screen.

This commit is contained in:
2026-05-07 15:39:01 +02:00
parent 25df79eef5
commit 6375b215cb
@@ -71,6 +71,10 @@ if not is_pw_disabled():
with st.form("signin_form"):
pw = st.text_input("Password", type="password")
submitted = st.form_submit_button("Sign in")
st.components.v1.html(
"<script>setTimeout(()=>window.parent.document.querySelector('input[type=\"password\"]')?.focus(),100)</script>",
height=0
)
if submitted:
if verify_password(pw, pw_rec):
st.session_state['frontend_authenticated'] = True