1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-04 18:53:20 +00:00

Merge branch 'main' into feature/passkey-provider

This commit is contained in:
Jeffrey Holland
2025-08-15 18:30:19 +02:00
committed by GitHub

View File

@@ -2459,22 +2459,23 @@ export default class AutofillService implements AutofillServiceInterface {
break;
}
const includesUsernameFieldName =
this.findMatchingFieldIndex(f, AutoFillConstants.UsernameFieldNames) > -1;
if (
!f.disabled &&
(canBeReadOnly || !f.readonly) &&
(withoutForm || f.form === passwordField.form) &&
(withoutForm || f.form === passwordField.form || includesUsernameFieldName) &&
(canBeHidden || f.viewable) &&
(f.type === "text" || f.type === "email" || f.type === "tel")
) {
usernameField = f;
if (this.findMatchingFieldIndex(f, AutoFillConstants.UsernameFieldNames) > -1) {
// We found an exact match. No need to keep looking.
// We found an exact match. No need to keep looking.
if (includesUsernameFieldName) {
break;
}
}
}
return usernameField;
}