diff --git a/apps/browser/src/autofill/services/autofill-overlay-content.service.ts b/apps/browser/src/autofill/services/autofill-overlay-content.service.ts index acf0dedde27..6757972e839 100644 --- a/apps/browser/src/autofill/services/autofill-overlay-content.service.ts +++ b/apps/browser/src/autofill/services/autofill-overlay-content.service.ts @@ -424,6 +424,7 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ } await this.setupSubmitListenerOnFormlessField(formFieldElement); + return; } /** @@ -439,15 +440,16 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ this.formElements.add(formElement); formElement.addEventListener(EVENTS.SUBMIT, this.handleFormFieldSubmitEvent); - const closesSubmitButton = await this.findSubmitButton(formElement); + const closestSubmitButton = await this.findSubmitButton(formElement); // If we cannot find a submit button within the form, check for a submit button outside the form. - if (!closesSubmitButton) { + if (!closestSubmitButton) { await this.setupSubmitListenerOnFormlessField(formFieldElement); return; } - this.setupSubmitButtonEventListeners(closesSubmitButton); + this.setupSubmitButtonEventListeners(closestSubmitButton); + return; } } @@ -459,9 +461,11 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ */ private async setupSubmitListenerOnFormlessField(formFieldElement: FillableFormFieldElement) { if (formFieldElement && !this.fieldsWithSubmitElements.has(formFieldElement)) { - const closesSubmitButton = await this.findClosestFormlessSubmitButton(formFieldElement); - this.setupSubmitButtonEventListeners(closesSubmitButton); + const closestSubmitButton = await this.findClosestFormlessSubmitButton(formFieldElement); + + this.setupSubmitButtonEventListeners(closestSubmitButton); } + return; } /** diff --git a/apps/browser/src/autofill/services/collect-autofill-content.service.spec.ts b/apps/browser/src/autofill/services/collect-autofill-content.service.spec.ts index 7471c298917..5f3bc4dfff9 100644 --- a/apps/browser/src/autofill/services/collect-autofill-content.service.spec.ts +++ b/apps/browser/src/autofill/services/collect-autofill-content.service.spec.ts @@ -317,6 +317,7 @@ describe("CollectAutofillContentService", () => { __form__0: { opid: "__form__0", htmlAction: formAction, + htmlClass: null, htmlName: formName, htmlID: formId, htmlMethod: formMethod, @@ -544,6 +545,7 @@ describe("CollectAutofillContentService", () => { __form__0: { opid: "__form__0", htmlAction: formAction1, + htmlClass: null, htmlName: formName1, htmlID: formId1, htmlMethod: formMethod1, @@ -551,6 +553,7 @@ describe("CollectAutofillContentService", () => { __form__1: { opid: "__form__1", htmlAction: formAction2, + htmlClass: null, htmlName: formName2, htmlID: formId2, htmlMethod: formMethod2, diff --git a/apps/browser/src/autofill/services/collect-autofill-content.service.ts b/apps/browser/src/autofill/services/collect-autofill-content.service.ts index 13c546bccdb..0f9c8993014 100644 --- a/apps/browser/src/autofill/services/collect-autofill-content.service.ts +++ b/apps/browser/src/autofill/services/collect-autofill-content.service.ts @@ -228,6 +228,7 @@ export class CollectAutofillContentService implements CollectAutofillContentServ opid: formElement.opid, htmlAction: this.getFormActionAttribute(formElement), htmlName: this.getPropertyOrAttribute(formElement, "name"), + htmlClass: this.getPropertyOrAttribute(formElement, "class"), htmlID: this.getPropertyOrAttribute(formElement, "id"), htmlMethod: this.getPropertyOrAttribute(formElement, "method"), }); 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 43efd338c6e..dff40a3ab93 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 @@ -56,6 +56,7 @@ export class InlineMenuFieldQualificationService "neuer benutzer", "neues passwort", "neue e-mail", + "pwdcheck", ]; private updatePasswordFieldKeywords = [ "update password",