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
Controlled input makes browser not saving submitted value (for autocomplete) #15739
Comments
Uncontrolled value saved on the window, whereas the controlled input value saved in their state. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! |
Oh wow. Good find. I guess this is also due to attribute syncing. We're going to fix this eventually but it would be a breaking change so for now let's keep it open. |
@gaearon: Are there any plans to fix this? It almost 2 years since the report and at least in my eyes this is a huge UX bug. This bug affects other frameworks (antd, material UI):
I'm also not getting it, why this one should be a breaking change. If autoComplete is "on" react could to this setAttribute('value', ''); under the hood and it would be fine. |
Same problem here |
autoComplete is Not working for controlled Input. |
This also affects Formik performance, which is very bad |
I am not even using controlled input. Still I am facing this issue when using Firefox. I am just using input type text and the fetching the value using id on the time of submit form. Still it won't show the auto-fill suggestion box. |
Just to mention that there is a "workaround" (=wild hack) we used successfully for more than a year now: |
There actually has been some activity on the Firefox side to solve this: https://bugzilla.mozilla.org/show_bug.cgi?id=1642570 It's already working in Firefox Nightly for me and seems to be scheduled for release in version 105, 2022-09-20 |
Tested it right now in Firefox 106.0.3 and it seems to work! |
Bug (behaves different per browser, but generally inconsistent to uncontrolled inputs)
Current behavior
Reproduce with https://jsfiddle.net/bootleq/hos4r6qd/
a
in name field, andb
in uncontrolled field.Expected behavior
Browser provides
a
suggestion for name andb
for uncontrolled field.Controlled and uncontrolled elements should behave the same.
Actual result
Uncontrolled input has
b
suggestion, but controlled input (name) has no suggestion.Tested on Windows 7, Google Chrome 74.0.3729.169.
And on Firefox 68.0b4, we can click the workaround button before submit, by reset the
value
DOM attribute it behaves as expected.The text was updated successfully, but these errors were encountered: