diff --git a/apps/browser/src/autofill/background/overlay.background.spec.ts b/apps/browser/src/autofill/background/overlay.background.spec.ts index ebd73fa4cc..d59ed447dd 100644 --- a/apps/browser/src/autofill/background/overlay.background.spec.ts +++ b/apps/browser/src/autofill/background/overlay.background.spec.ts @@ -629,6 +629,9 @@ describe("OverlayBackground", () => { it("skips updating the inline menu list if the user has the inline menu set to open on button click", async () => { inlineMenuVisibilityMock$.next(AutofillOverlayVisibility.OnButtonClick); + jest + .spyOn(overlayBackground as any, "checkIsInlineMenuListVisible") + .mockReturnValue(false); tabsSendMessageSpy.mockImplementation((_tab, message, _options) => { if (message.command === "checkFocusedFieldHasValue") { return Promise.resolve(true); diff --git a/apps/browser/src/autofill/background/overlay.background.ts b/apps/browser/src/autofill/background/overlay.background.ts index c1dc359e94..41791b3b75 100644 --- a/apps/browser/src/autofill/background/overlay.background.ts +++ b/apps/browser/src/autofill/background/overlay.background.ts @@ -1010,8 +1010,8 @@ export class OverlayBackground implements OverlayBackgroundInterface { ); if ( - (await this.getInlineMenuVisibility()) === AutofillOverlayVisibility.OnButtonClick && - !this.isInlineMenuListVisible + !this.checkIsInlineMenuListVisible() && + (await this.getInlineMenuVisibility()) === AutofillOverlayVisibility.OnButtonClick ) { return; }