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
Bug: Firefox: Autocomplete/Autofill still not working #18986
Comments
I've looked into this and it seems to happen because React sets the Removing this ""solves"" the issue:
The reason why React does assign the You could make autocomplete/autofill work on Firefox on a controlled input by making function handleChange(event) {
Object.defineProperty(event.target, "defaultValue", {
configurable: true,
get() { return "" },
set() {},
});
setValue(event.target.value);
} This works as long as you don't have a Anyways, this is probably a bug in Firefox .. or a feature-(bug?) but I haven't found anything in the specs, MDN, or elsewhere that describes why I am/was working on a PR to solve this .. but, maybe Firefox could solve it on their side? 🙈 (unclear if it's a bug) Edit: this is a demo that demonstrates the issue in Firefox. It's plain HTML + 3 line JS code: |
If anyone interested, I opened this: |
I believe this is a duplicate of #15739 |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
bump |
Firefox seems to have fixed this a while ago in FF 105, see https://bugzilla.mozilla.org/show_bug.cgi?id=1642570 Tested it with FF 114 and works just fine 👍 |
Looks like all these methods with
import { usePreventAutofill } from 'react-declarative';
...
const preventAutofill = usePreventAutofill();
...
return (
<InputBase
...
{...preventAutofill}
/>
);
|
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
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! |
Description, steps to reproduce and sandbox example see #17022!
The native autocomplete function from firefox is still not working.
This also affects other frameworks (antd, material UI):
It would be nice if someone of the react community could give it a shot because I think that the native autocomplete is a very important UX feature.
The text was updated successfully, but these errors were encountered: