mirror of
https://github.com/bitwarden/browser
synced 2025-01-27 11:39:42 +01:00
reorder address field identification (#11824)
Co-authored-by: Evan Bassler <evanbassler@Evans-MBP.attlocal.net> Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
This commit is contained in:
parent
a4156799e9
commit
c1302a3604
@ -1597,16 +1597,6 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
) {
|
) {
|
||||||
fillFields.email = f;
|
fillFields.email = f;
|
||||||
break;
|
break;
|
||||||
} else if (
|
|
||||||
!fillFields.address &&
|
|
||||||
AutofillService.isFieldMatch(
|
|
||||||
f[attr],
|
|
||||||
IdentityAutoFillConstants.AddressFieldNames,
|
|
||||||
IdentityAutoFillConstants.AddressFieldNameValues,
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
fillFields.address = f;
|
|
||||||
break;
|
|
||||||
} else if (
|
} else if (
|
||||||
!fillFields.address1 &&
|
!fillFields.address1 &&
|
||||||
AutofillService.isFieldMatch(f[attr], IdentityAutoFillConstants.Address1FieldNames)
|
AutofillService.isFieldMatch(f[attr], IdentityAutoFillConstants.Address1FieldNames)
|
||||||
@ -1625,6 +1615,16 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
) {
|
) {
|
||||||
fillFields.address3 = f;
|
fillFields.address3 = f;
|
||||||
break;
|
break;
|
||||||
|
} else if (
|
||||||
|
!fillFields.address &&
|
||||||
|
AutofillService.isFieldMatch(
|
||||||
|
f[attr],
|
||||||
|
IdentityAutoFillConstants.AddressFieldNames,
|
||||||
|
IdentityAutoFillConstants.AddressFieldNameValues,
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
fillFields.address = f;
|
||||||
|
break;
|
||||||
} else if (
|
} else if (
|
||||||
!fillFields.postalCode &&
|
!fillFields.postalCode &&
|
||||||
AutofillService.isFieldMatch(f[attr], IdentityAutoFillConstants.PostalCodeFieldNames)
|
AutofillService.isFieldMatch(f[attr], IdentityAutoFillConstants.PostalCodeFieldNames)
|
||||||
@ -1818,11 +1818,6 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.shouldMakeIdentityAddressFillScript(filledFields, keywordsList)) {
|
|
||||||
this.makeIdentityAddressFillScript(fillScript, filledFields, field, identity);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.shouldMakeIdentityAddress1FillScript(filledFields, keywordsCombined)) {
|
if (this.shouldMakeIdentityAddress1FillScript(filledFields, keywordsCombined)) {
|
||||||
this.makeScriptActionWithValue(fillScript, identity.address1, field, filledFields);
|
this.makeScriptActionWithValue(fillScript, identity.address1, field, filledFields);
|
||||||
continue;
|
continue;
|
||||||
@ -1838,6 +1833,11 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.shouldMakeIdentityAddressFillScript(filledFields, keywordsList)) {
|
||||||
|
this.makeIdentityAddressFillScript(fillScript, filledFields, field, identity);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.shouldMakeIdentityPostalCodeFillScript(filledFields, keywordsCombined)) {
|
if (this.shouldMakeIdentityPostalCodeFillScript(filledFields, keywordsCombined)) {
|
||||||
this.makeScriptActionWithValue(fillScript, identity.postalCode, field, filledFields);
|
this.makeScriptActionWithValue(fillScript, identity.postalCode, field, filledFields);
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user