Autofocus password box on login screen.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user