-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
st.form() not updating values on password auto-full (regression in Streamlit 1.25) #7101
Comments
This could be related to #7084 |
Hey @xl0. This issue has me stumped. We made a change on pressing Enter on a text input, to submit a form, but this seems different. Couple questions:
Thanks for your help! |
user=user This might be a separate bug. I also noticed, in Chrome, if I interact with the Username field at all, it does get populated. See the gif: |
Seems like this forum thread is related |
Hi, I will be investigating this later this week. I am currently working on another bug. I definitely find this bug to be super annoying for everyone so hopefully i'll root cause it soon and fix it soon. |
I was able to reproduce on this streamlit cloud app. I think this is probably a bug created by me and hopefully I'll have a fix soon. |
#7150) Describe your changes Change commitWidgetValue to take in dirty parameter as we need to change dirty to true when committing the widget value we need to commit the widget value because when autofill is done, the widget value is not committed as thus username will show up to be an empty string without interaction GitHub Issue Link (if applicable) #7101 #7084 Testing Plan Explanation of why no additional tests are needed Unit Tests (JS and/or Python) readded tests I deleted before with some slight additions E2E Tests Any manual testing needed? yes it doesn't seem very doable to test autofill functionality. However, I can probably add some tests for commit value being called Contribution License Agreement By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
@willhuang1997 Does #7150 close this issue? |
Yep |
@willhuang1997 Thank you for your work. Apparently, your bugfix has been added to the latest version of Streamlit. Unfortunately, the error still appears in the following code. While using Firefox and Chrome autofill
|
@ctrimborn , You're using st.button and not st.submit_button. I think this issue is specifically for st.form_button(). However, you're using st.button which is different. Can you create a separate bug for this? |
+1 for this issue,both st.form_submit_button and st.button. |
streamlit#7150) Describe your changes Change commitWidgetValue to take in dirty parameter as we need to change dirty to true when committing the widget value we need to commit the widget value because when autofill is done, the widget value is not committed as thus username will show up to be an empty string without interaction GitHub Issue Link (if applicable) streamlit#7101 streamlit#7084 Testing Plan Explanation of why no additional tests are needed Unit Tests (JS and/or Python) readded tests I deleted before with some slight additions E2E Tests Any manual testing needed? yes it doesn't seem very doable to test autofill functionality. However, I can probably add some tests for commit value being called Contribution License Agreement By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
streamlit#7150) Describe your changes Change commitWidgetValue to take in dirty parameter as we need to change dirty to true when committing the widget value we need to commit the widget value because when autofill is done, the widget value is not committed as thus username will show up to be an empty string without interaction GitHub Issue Link (if applicable) streamlit#7101 streamlit#7084 Testing Plan Explanation of why no additional tests are needed Unit Tests (JS and/or Python) readded tests I deleted before with some slight additions E2E Tests Any manual testing needed? yes it doesn't seem very doable to test autofill functionality. However, I can probably add some tests for commit value being called Contribution License Agreement By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
streamlit#7150) Describe your changes Change commitWidgetValue to take in dirty parameter as we need to change dirty to true when committing the widget value we need to commit the widget value because when autofill is done, the widget value is not committed as thus username will show up to be an empty string without interaction GitHub Issue Link (if applicable) streamlit#7101 streamlit#7084 Testing Plan Explanation of why no additional tests are needed Unit Tests (JS and/or Python) readded tests I deleted before with some slight additions E2E Tests Any manual testing needed? yes it doesn't seem very doable to test autofill functionality. However, I can probably add some tests for commit value being called Contribution License Agreement By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
Checklist
Summary
1.25.0 partially ignores form auto-fill.
Let's say, I have a login form with username and password fields.
The password is saved by the browser. I click on the password field and select the saved password.
Both the username and password fields are auto-filled by the browser:
The form should return the username and password, but in 1.25.0 only the password is being set.
In 1.24.1:
user=user
password=sdfsfdsfdsfsd
In 1.25.0:
user=
password=sdfsfdsfdsfsd
The username field returns an empty string, despite being auto-filled by the browser.
Reproducible Code Example
Steps To Reproduce
No response
Expected Behavior
No response
Current Behavior
No response
Is this a regression?
Debug info
Additional Information
No response
The text was updated successfully, but these errors were encountered: