From 552b6f8076534c2d21512fb695e7c4ed5dc26184 Mon Sep 17 00:00:00 2001 From: Cesar Gonzalez Date: Tue, 17 Sep 2024 12:01:07 -0500 Subject: [PATCH] [PM-8833] Working through placement of the password generator --- .../src/autofill/background/overlay.background.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/browser/src/autofill/background/overlay.background.ts b/apps/browser/src/autofill/background/overlay.background.ts index 1a534c5f9c..88643634e0 100644 --- a/apps/browser/src/autofill/background/overlay.background.ts +++ b/apps/browser/src/autofill/background/overlay.background.ts @@ -1355,6 +1355,11 @@ export class OverlayBackground implements OverlayBackgroundInterface { previousFocusedFieldData?.inlineMenuFillType === InlineMenuFillType.AccountCreation && this.focusedFieldData.inlineMenuFillType !== InlineMenuFillType.AccountCreation; + if (this.focusedFieldData.inlineMenuFillType === InlineMenuFillType.PasswordGeneration) { + this.refreshGeneratedPassword().catch((error) => this.logService.error(error)); + return; + } + if (accountCreationFieldBlurred || this.showInlineMenuAccountCreation()) { this.updateInlineMenuOnAccountCreationField(previousFocusedFieldData).catch((error) => this.logService.error(error), @@ -1385,9 +1390,8 @@ export class OverlayBackground implements OverlayBackgroundInterface { } if ( - this.focusedFieldData.inlineMenuFillType === InlineMenuFillType.PasswordGeneration || - (this.focusedFieldData.inlineMenuFillType === CipherType.Login && - this.focusedFieldData.accountCreationFieldType === "password") + this.focusedFieldData.inlineMenuFillType === CipherType.Login && + this.focusedFieldData.accountCreationFieldType === "password" ) { await this.refreshGeneratedPassword(); return;