Move fullname containsOptions to Identity constants

This commit is contained in:
Daniel James Smith 2022-01-02 16:15:52 +01:00
parent 306b7e38c3
commit 30f7e29773
No known key found for this signature in database
GPG Key ID: 03E4BD365FF06726
2 changed files with 3 additions and 1 deletions

View File

@ -596,7 +596,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],
IdentityAutoFillConstants.FullNameFieldNames, ['full-name', 'your-name'])) {
IdentityAutoFillConstants.FullNameFieldNames, IdentityAutoFillConstants.FullNameFieldNameValues)) {
fillFields.name = f;
break;
} else if (!fillFields.firstName && this.isFieldMatch(f[attr],

View File

@ -275,6 +275,8 @@ export class IdentityAutoFillConstants {
static readonly FullNameFieldNames: string[] = ["name", "full-name", "your-name"];
static readonly FullNameFieldNameValues: string[] = ["full-name", "your-name"];
static readonly TitleFieldNames: string[] = ["honorific-prefix", "prefix", "title"];
static readonly FirstnameFieldNames: string[] = [