Skip to content

Commit

Permalink
Stop password managers from autofilling address fields
Browse files Browse the repository at this point in the history
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
  • Loading branch information
michaelabon committed Oct 18, 2024
1 parent d48205c commit 6ffba9f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down

0 comments on commit 6ffba9f

Please sign in to comment.