From 0b9af06945bab22a41ca02f190b2469afbb48e8a Mon Sep 17 00:00:00 2001 From: Cesar Gonzalez Date: Thu, 13 Jun 2024 14:16:28 -0500 Subject: [PATCH] [PM-8027] Fixing an issue where a field that has no form and no visible password fields should be qualified if a single password field exists in the page --- .../services/inline-menu-field-qualification.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/browser/src/autofill/services/inline-menu-field-qualification.service.ts b/apps/browser/src/autofill/services/inline-menu-field-qualification.service.ts index dd8e52e915e..07d99fd19f1 100644 --- a/apps/browser/src/autofill/services/inline-menu-field-qualification.service.ts +++ b/apps/browser/src/autofill/services/inline-menu-field-qualification.service.ts @@ -167,6 +167,12 @@ export class InlineMenuFieldQualificationService return false; } + // If no visible fields are found on the page, but we have a single password + // field we should assume that the field is part of a login form. + if (passwordFieldsInPageDetails.length === 1) { + return true; + } + // If the page does not contain any password fields, it might be part of a multistep login form. // That will only be the case if the field does not explicitly have its autocomplete attribute // set to "off" or "false".