Files
TREK/client/src/utils/noAutofill.ts
T
Maurice eb4e74b5c3 fix(forms): keep password managers out of a place's contact fields and the admin user forms
1Password filled the signed-in user's login into a place's e-mail field, and
offered the admin's own credentials for an account being created. The fields
now carry each manager's opt-out; autocomplete=off alone is ignored.
2026-10-14 13:24:27 +02:00

16 lines
628 B
TypeScript

/**
* For a field that holds somebody else's details: a place's e-mail and phone,
* the account an admin is creating. Password managers read such a field as a
* login and offer, or simply fill in, the signed-in user's own credentials.
* `autocomplete="off"` alone does not stop them (1Password ignores it on
* purpose), so each one gets its own opt-out. Never use it on a login or on the
* user's own account fields, where autofill is wanted.
*/
export const NO_AUTOFILL = {
autoComplete: 'off',
'data-1p-ignore': 'true',
'data-lpignore': 'true',
'data-bwignore': 'true',
'data-form-type': 'other',
} as const;