-
Notifications
You must be signed in to change notification settings - Fork 20
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
Browser autofill - name attribute on native inputs #153
Comments
Hi @nunntom, I think it should be sufficient to add What do you think? Looking at https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete it says:
I don't understand that and I likely wouldn't want to implement anything like that unless I know why it is absolutely necessary. Is this something you would like to attempt? Otherwise I might get around doing that at some point. :-) References |
Thanks @aforemny. It seems there are two distinct behaviours confusingly often called either autocomplete or auto-fill.
Ideally being able to set the name and the autocomplete attributes would cover both. I can do this for TextField and TextArea. I don't think so for Select as it is not a native element and I can't find any documentation for this on the MDC select. For my use case TextField and TextArea is enough. |
Thanks for elaborating! I'm assuming 1. refers to autofill while 2. is autocomplete.
Interesting, so that might relate to the input in addition having to be in a Does the
Contrary to functions However, the fact that Alternatively, I would also be OK to add That would be a general escape hatch for both issues, without us having to maintain auto-fill/ auto-complete support.
|
The names are confusing. In Chrome and Firefox settings 2. is called autofill. 1. is not well defined.
I haven't been able to find documentation on this. I found this out mostly by experimentation. Try playing around with this jsfiddle: A slightly out of date article but still useful: Clearly 2. is the better option in the long run but not currently supported across the board including non en-US Firefox. Users may be used to 1. working in many cases. I think |
Thanks for all the information. I will digest it as time permits! :-)
OK. We can go ahead with this independent of this particular use case.
A pull request would be welcome if you feel up for it! |
Thanks for the great package.
How to deal with browser autofill/autocomplete? There doesn't seem to be a way to give the native inputs a name or id attribute, only attributes applied to the custom element wrapper. How do we prompt the browser to give helpful suggestions? It would be useful to be able to give attributes to the inputs.
The text was updated successfully, but these errors were encountered: