diff --git a/src/services/autofill.service.ts b/src/services/autofill.service.ts index 17db08fce2..4439e87f02 100644 --- a/src/services/autofill.service.ts +++ b/src/services/autofill.service.ts @@ -659,7 +659,7 @@ export default class AutofillService implements AutofillServiceInterface { fillFields.country = f; break; } else if (!fillFields.phone && this.isFieldMatch(f[attr], - ['phone', 'mobile', 'mobile-phone', 'tel', 'telephone', 'phone-number'])) { + IdentityAutoFillConstants.PhoneFieldNames)) { fillFields.phone = f; break; } else if (!fillFields.username && this.isFieldMatch(f[attr], diff --git a/src/services/autofillConstants.ts b/src/services/autofillConstants.ts index c65cf7ffb1..875a462b4f 100644 --- a/src/services/autofillConstants.ts +++ b/src/services/autofillConstants.ts @@ -288,6 +288,15 @@ export class IdentityAutoFillConstants { "address-country-code", ]; + static readonly PhoneFieldNames: string[] = [ + "phone", + "mobile", + "mobile-phone", + "tel", + "telephone", + "phone-number", + ]; + static readonly IsoCountries: { [id: string]: string } = { afghanistan: "AF", "aland islands": "AX",