diff --git a/src/services/autofill.service.ts b/src/services/autofill.service.ts index a03562f75a..be65fbdcd2 100644 --- a/src/services/autofill.service.ts +++ b/src/services/autofill.service.ts @@ -602,7 +602,7 @@ export default class AutofillService implements AutofillServiceInterface { // ref https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill // ref https://developers.google.com/web/fundamentals/design-and-ux/input/forms/ if (!fillFields.name && this.isFieldMatch(f[attr], - ['name', 'full-name', 'your-name'], ['full-name', 'your-name'])) { + IdentityAutoFillConstants.FullNameFieldNames, ['full-name', 'your-name'])) { fillFields.name = f; break; } else if (!fillFields.firstName && this.isFieldMatch(f[attr], diff --git a/src/services/autofillConstants.ts b/src/services/autofillConstants.ts index c586dfeafe..0ef5295be9 100644 --- a/src/services/autofillConstants.ts +++ b/src/services/autofillConstants.ts @@ -190,6 +190,8 @@ export class IdentityAutoFillConstants { "data-recurly", ]; + static readonly FullNameFieldNames: string[] = ["name", "full-name", "your-name"]; + static readonly TitleFieldNames: string[] = ["honorific-prefix", "prefix", "title"]; static readonly FirstnameFieldNames: string[] = [