mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
[PM-17969] Bugfix - Notification bar does not come up when creating an account demo.yubico.com/playground (#13253)
* add keyword to account creation field keywords * include html class attribute value when gathering form attribute information * misc cleanup/consistency * update tests
This commit is contained in:
@@ -424,6 +424,7 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ
|
|||||||
}
|
}
|
||||||
|
|
||||||
await this.setupSubmitListenerOnFormlessField(formFieldElement);
|
await this.setupSubmitListenerOnFormlessField(formFieldElement);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -439,15 +440,16 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ
|
|||||||
this.formElements.add(formElement);
|
this.formElements.add(formElement);
|
||||||
formElement.addEventListener(EVENTS.SUBMIT, this.handleFormFieldSubmitEvent);
|
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 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);
|
await this.setupSubmitListenerOnFormlessField(formFieldElement);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setupSubmitButtonEventListeners(closesSubmitButton);
|
this.setupSubmitButtonEventListeners(closestSubmitButton);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -459,9 +461,11 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ
|
|||||||
*/
|
*/
|
||||||
private async setupSubmitListenerOnFormlessField(formFieldElement: FillableFormFieldElement) {
|
private async setupSubmitListenerOnFormlessField(formFieldElement: FillableFormFieldElement) {
|
||||||
if (formFieldElement && !this.fieldsWithSubmitElements.has(formFieldElement)) {
|
if (formFieldElement && !this.fieldsWithSubmitElements.has(formFieldElement)) {
|
||||||
const closesSubmitButton = await this.findClosestFormlessSubmitButton(formFieldElement);
|
const closestSubmitButton = await this.findClosestFormlessSubmitButton(formFieldElement);
|
||||||
this.setupSubmitButtonEventListeners(closesSubmitButton);
|
|
||||||
|
this.setupSubmitButtonEventListeners(closestSubmitButton);
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -317,6 +317,7 @@ describe("CollectAutofillContentService", () => {
|
|||||||
__form__0: {
|
__form__0: {
|
||||||
opid: "__form__0",
|
opid: "__form__0",
|
||||||
htmlAction: formAction,
|
htmlAction: formAction,
|
||||||
|
htmlClass: null,
|
||||||
htmlName: formName,
|
htmlName: formName,
|
||||||
htmlID: formId,
|
htmlID: formId,
|
||||||
htmlMethod: formMethod,
|
htmlMethod: formMethod,
|
||||||
@@ -544,6 +545,7 @@ describe("CollectAutofillContentService", () => {
|
|||||||
__form__0: {
|
__form__0: {
|
||||||
opid: "__form__0",
|
opid: "__form__0",
|
||||||
htmlAction: formAction1,
|
htmlAction: formAction1,
|
||||||
|
htmlClass: null,
|
||||||
htmlName: formName1,
|
htmlName: formName1,
|
||||||
htmlID: formId1,
|
htmlID: formId1,
|
||||||
htmlMethod: formMethod1,
|
htmlMethod: formMethod1,
|
||||||
@@ -551,6 +553,7 @@ describe("CollectAutofillContentService", () => {
|
|||||||
__form__1: {
|
__form__1: {
|
||||||
opid: "__form__1",
|
opid: "__form__1",
|
||||||
htmlAction: formAction2,
|
htmlAction: formAction2,
|
||||||
|
htmlClass: null,
|
||||||
htmlName: formName2,
|
htmlName: formName2,
|
||||||
htmlID: formId2,
|
htmlID: formId2,
|
||||||
htmlMethod: formMethod2,
|
htmlMethod: formMethod2,
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ export class CollectAutofillContentService implements CollectAutofillContentServ
|
|||||||
opid: formElement.opid,
|
opid: formElement.opid,
|
||||||
htmlAction: this.getFormActionAttribute(formElement),
|
htmlAction: this.getFormActionAttribute(formElement),
|
||||||
htmlName: this.getPropertyOrAttribute(formElement, "name"),
|
htmlName: this.getPropertyOrAttribute(formElement, "name"),
|
||||||
|
htmlClass: this.getPropertyOrAttribute(formElement, "class"),
|
||||||
htmlID: this.getPropertyOrAttribute(formElement, "id"),
|
htmlID: this.getPropertyOrAttribute(formElement, "id"),
|
||||||
htmlMethod: this.getPropertyOrAttribute(formElement, "method"),
|
htmlMethod: this.getPropertyOrAttribute(formElement, "method"),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ export class InlineMenuFieldQualificationService
|
|||||||
"neuer benutzer",
|
"neuer benutzer",
|
||||||
"neues passwort",
|
"neues passwort",
|
||||||
"neue e-mail",
|
"neue e-mail",
|
||||||
|
"pwdcheck",
|
||||||
];
|
];
|
||||||
private updatePasswordFieldKeywords = [
|
private updatePasswordFieldKeywords = [
|
||||||
"update password",
|
"update password",
|
||||||
|
|||||||
Reference in New Issue
Block a user