Fix disabling autofill in last versions of Chrome#689
Conversation
Last versions of Google Chrome ignore property 'autocomplete="off"'. We need change it to 'autocomplete="new-password"' for disabling internal
Chrome autofill feature when plugin initialized. It works for any text fields, not only for password text fields.
Change
// Remove autocomplete attribute to prevent native suggestions:
that.element.setAttribute('autocomplete', 'off');
to:
// Remove autocomplete attribute to prevent native suggestions:
that.element.setAttribute('autocomplete', 'new-password');
Proof: https://stackoverflow.com/questions/15738259/disabling-chrome-autofill
Fix devbridge#677
|
Thanks for this contribution, and apologies for the very long silence. The project was dormant for several years and has just shipped v2.0, which is a ground-up TypeScript rewrite with a new build (esbuild), test runner (Vitest + jsdom), and CI pipeline. As a result this PR no longer applies cleanly against I'm closing it as part of a triage pass on the long-stale PR backlog — not because the idea lacks merit. If this change is still valuable to you against 2.0, please open a fresh PR (or an issue first if you'd like to confirm direction); I'll review new submissions against the current codebase promptly. Thanks again for taking the time. |
Last versions of Google Chrome ignore property 'autocomplete="off"'. We need change it to 'autocomplete="new-password"' for disabling internal Chrome autofill feature when plugin initialized. It works for any text fields, not only for password text fields.
Change
// Remove autocomplete attribute to prevent native suggestions:
that.element.setAttribute('autocomplete', 'off');
to:
// Remove autocomplete attribute to prevent native suggestions:
that.element.setAttribute('autocomplete', 'new-password');
Proof: https://stackoverflow.com/questions/15738259/disabling-chrome-autofill