Stop password managers from autofilling address fields

I am a 1Password user (and employee).
Whenever I am editing a local business's details in iD,
I am frustrated that the 1Password browser extension offers
to fill out my personal address
instead of the business's address.

I don't work on our browser extension,
I could not tell you why every password manager
has their own custom data attribute
when autocomplete=off exists.
But, for fairness,
I am including other major password managers'
custom data attributes to stop them as well
from autofilling address fields.

I was very pleased to find out that
there was already
a well-used utility function
to disable autocomplete/autocorrect/autocapitalize.

Fixes #10507
This commit is contained in:
Michael Abon
2024-10-18 12:24:07 -05:00
parent d48205cb32
commit 6ffba9f7ff
+4
View File
@@ -509,6 +509,10 @@ export function utilNoAuto(selection) {
.attr('autocomplete', 'new-password')
.attr('autocorrect', 'off')
.attr('autocapitalize', 'off')
.attr('data-1p-ignore', 'true') // 1Password
.attr('data-bwignore', 'true') // Bitwarden
.attr('data-form-type', 'other') // Dashlane
.attr('data-lpignore', 'true') // LastPass
.attr('spellcheck', isText ? 'true' : 'false');
}