From 5cb1d7965fd74ea7b503e0af1be5e34763bc8f49 Mon Sep 17 00:00:00 2001 From: Cesar Gonzalez Date: Tue, 25 Jun 2024 04:57:53 -0500 Subject: [PATCH] [PM-5189] Fixing issues found within code review behind how we position elements --- .../autofill/background/overlay.background.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/apps/browser/src/autofill/background/overlay.background.ts b/apps/browser/src/autofill/background/overlay.background.ts index 3469dd6716..08a19b8acf 100644 --- a/apps/browser/src/autofill/background/overlay.background.ts +++ b/apps/browser/src/autofill/background/overlay.background.ts @@ -926,6 +926,7 @@ export class OverlayBackground implements OverlayBackgroundInterface { return; } + this.closeInlineMenu(sender); await this.openViewVaultItemPopout(sender.tab, { cipherId: cipher.id, action: SHOW_AUTOFILL_BUTTON, @@ -1034,6 +1035,7 @@ export class OverlayBackground implements OverlayBackgroundInterface { return; } + this.closeInlineMenu(sender); const uriView = new LoginUriView(); uriView.uri = login.uri; @@ -1097,21 +1099,11 @@ export class OverlayBackground implements OverlayBackgroundInterface { private async checkIsInlineMenuButtonVisible( sender: chrome.runtime.MessageSender, ): Promise { - const isVisible = !!(await BrowserApi.tabSendMessage( + return await BrowserApi.tabSendMessage( sender.tab, { command: "checkIsAutofillInlineMenuButtonVisible" }, { frameId: 0 }, - )); - - // If the element is visible in the DOM, ensure that it is not hidden by CSS. - if (isVisible) { - void this.toggleInlineMenuHidden( - { isInlineMenuHidden: false, setTransparentInlineMenu: false }, - sender, - ); - } - - return isVisible; + ); } /**