[PM-4415] Fixing an issue with field qualification of usernames on login forms

This commit is contained in:
Cesar Gonzalez 2024-10-08 09:16:16 -05:00
parent b4c0919a28
commit cafcc44716
No known key found for this signature in database
GPG Key ID: 3381A5457F8CCECF
2 changed files with 6 additions and 1 deletions

View File

@ -436,6 +436,7 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ
const closesSubmitButton = await this.findSubmitButton(formElement);
// If we cannot find a submit button within the form, check for a submit button outside the form.
if (!closesSubmitButton) {
await this.setupSubmitListenerOnFormlessField(formFieldElement);
return;

View File

@ -435,7 +435,11 @@ export class InlineMenuFieldQualificationService
const fieldsWithinForm = pageDetails.fields.filter(
(pageDetailsField) => pageDetailsField.form === field.form,
);
return fieldsWithinForm.length === 1;
if (fieldsWithinForm.length === 1) {
return true;
}
return fieldsWithinForm.filter((field) => field.viewable).length === 1;
}
// If a single password field exists within the page details, and that password field is part of