mirror of
https://github.com/bitwarden/browser
synced 2025-01-26 19:25:10 +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;
|
||||
break;
|
||||
} else if (
|
||||
!fillFields.address &&
|
||||
AutofillService.isFieldMatch(
|
||||
f[attr],
|
||||
IdentityAutoFillConstants.AddressFieldNames,
|
||||
IdentityAutoFillConstants.AddressFieldNameValues,
|
||||
)
|
||||
) {
|
||||
fillFields.address = f;
|
||||
break;
|
||||
} else if (
|
||||
!fillFields.address1 &&
|
||||
AutofillService.isFieldMatch(f[attr], IdentityAutoFillConstants.Address1FieldNames)
|
||||
@ -1625,6 +1615,16 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
) {
|
||||
fillFields.address3 = f;
|
||||
break;
|
||||
} else if (
|
||||
!fillFields.address &&
|
||||
AutofillService.isFieldMatch(
|
||||
f[attr],
|
||||
IdentityAutoFillConstants.AddressFieldNames,
|
||||
IdentityAutoFillConstants.AddressFieldNameValues,
|
||||
)
|
||||
) {
|
||||
fillFields.address = f;
|
||||
break;
|
||||
} else if (
|
||||
!fillFields.postalCode &&
|
||||
AutofillService.isFieldMatch(f[attr], IdentityAutoFillConstants.PostalCodeFieldNames)
|
||||
@ -1818,11 +1818,6 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (this.shouldMakeIdentityAddressFillScript(filledFields, keywordsList)) {
|
||||
this.makeIdentityAddressFillScript(fillScript, filledFields, field, identity);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (this.shouldMakeIdentityAddress1FillScript(filledFields, keywordsCombined)) {
|
||||
this.makeScriptActionWithValue(fillScript, identity.address1, field, filledFields);
|
||||
continue;
|
||||
@ -1838,6 +1833,11 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (this.shouldMakeIdentityAddressFillScript(filledFields, keywordsList)) {
|
||||
this.makeIdentityAddressFillScript(fillScript, filledFields, field, identity);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (this.shouldMakeIdentityPostalCodeFillScript(filledFields, keywordsCombined)) {
|
||||
this.makeScriptActionWithValue(fillScript, identity.postalCode, field, filledFields);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user