Move fullname fieldnames to Identity constants
This commit is contained in:
parent
8f889310c2
commit
9e350e25ce
|
@ -602,7 +602,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||||
// ref https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill
|
// ref https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill
|
||||||
// ref https://developers.google.com/web/fundamentals/design-and-ux/input/forms/
|
// ref https://developers.google.com/web/fundamentals/design-and-ux/input/forms/
|
||||||
if (!fillFields.name && this.isFieldMatch(f[attr],
|
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;
|
fillFields.name = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.firstName && this.isFieldMatch(f[attr],
|
} else if (!fillFields.firstName && this.isFieldMatch(f[attr],
|
||||||
|
|
|
@ -190,6 +190,8 @@ export class IdentityAutoFillConstants {
|
||||||
"data-recurly",
|
"data-recurly",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
static readonly FullNameFieldNames: string[] = ["name", "full-name", "your-name"];
|
||||||
|
|
||||||
static readonly TitleFieldNames: string[] = ["honorific-prefix", "prefix", "title"];
|
static readonly TitleFieldNames: string[] = ["honorific-prefix", "prefix", "title"];
|
||||||
|
|
||||||
static readonly FirstnameFieldNames: string[] = [
|
static readonly FirstnameFieldNames: string[] = [
|
||||||
|
|
Loading…
Reference in New Issue