-
Notifications
You must be signed in to change notification settings - Fork 592
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
Prevent browser autocomplete suggestions on Choices elements #908
Conversation
Holy cow, I wasn't prepared to all those failing tests! /o |
Big thanks to you for fixing this! |
This seems good. Those test failures likely weren't anything to do with your change. Can you rebase on the latest version of master? I expect it will run cleanly and we can merge this. |
I can't easily rebase this patch as I made it from the GitHub editor. All I can do is close this PR and make another one after I cloned the repo on my account. |
Sounds good, that works too! |
Safari will display a contact autocomplete on every text input which `name` attribute contains "*name*" or does not have any `name` attribute. Adding a fine tuned `name`attribute to the input should prevent that. Plus, input type="search" seems more suited to the field intent (https://developer.mozilla.org/fr/docs/Web/HTML/Element/Input/search).
I did manage to set up a remote branch on my setup and rebase the commit onto |
Great! Just the one failing test now (much better 😁). Can you update the test at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parfait, merci!
This is the problem:
Safari will display a contact autocomplete on every text input which
name
attribute contains "name" or does not have anyname
attribute.Steps to reproduce:
Use defaut Choices.js (9.0.1) with macOS Safari
This is my solution:
Adding a fine tuned
name
attribute to the input should prevent that.Plus, input type="search" seems more suited to the field intent (https://developer.mozilla.org/fr/docs/Web/HTML/Element/Input/search).
In the mean time, I'm using the same kind of solution explained in #598 (comment), mimic-ing the attribute addition in this PR as a JS callback on page loaded:
Types of changes
Checklist