Move fullname fieldnames to Identity constants

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

View File

@ -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],

View File

@ -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[] = [