diff --git a/apps/browser/src/autofill/background/overlay.background.spec.ts b/apps/browser/src/autofill/background/overlay.background.spec.ts index 13cfca5bbc..50ff947fca 100644 --- a/apps/browser/src/autofill/background/overlay.background.spec.ts +++ b/apps/browser/src/autofill/background/overlay.background.spec.ts @@ -1222,13 +1222,6 @@ describe("OverlayBackground", () => { frameId: 2, }); - beforeEach(() => { - sendMockExtensionMessage({ - command: "updateIsFieldCurrentlyFocused", - isFieldCurrentlyFocused: true, - }); - }); - it("returns false if the focused field data is not set", async () => { sendMockExtensionMessage( { command: "checkShouldRepositionInlineMenu" }, @@ -1258,24 +1251,6 @@ describe("OverlayBackground", () => { expect(sendResponse).toHaveBeenCalledWith(false); }); - it("returns false if the field is not currently focused", async () => { - sendMockExtensionMessage({ - command: "updateIsFieldCurrentlyFocused", - isFieldCurrentlyFocused: false, - }); - const focusedFieldData = createFocusedFieldDataMock(); - sendMockExtensionMessage({ command: "updateFocusedFieldData", focusedFieldData }, sender); - - sendMockExtensionMessage( - { command: "checkShouldRepositionInlineMenu" }, - sender, - sendResponse, - ); - await flushPromises(); - - expect(sendResponse).toHaveBeenCalledWith(false); - }); - it("returns true if the focused field's frame id is equal to the sender's frame id", async () => { const focusedFieldData = createFocusedFieldDataMock(); sendMockExtensionMessage({ command: "updateFocusedFieldData", focusedFieldData }, sender); diff --git a/apps/browser/src/autofill/background/overlay.background.ts b/apps/browser/src/autofill/background/overlay.background.ts index 5197fabfb3..0ac53f2574 100644 --- a/apps/browser/src/autofill/background/overlay.background.ts +++ b/apps/browser/src/autofill/background/overlay.background.ts @@ -1024,11 +1024,7 @@ export class OverlayBackground implements OverlayBackgroundInterface { * @param sender - The sender of the message */ private checkShouldRepositionInlineMenu(sender: chrome.runtime.MessageSender): boolean { - if ( - !this.focusedFieldData || - sender.tab.id !== this.focusedFieldData.tabId || - !this.isFieldCurrentlyFocused - ) { + if (!this.focusedFieldData || sender.tab.id !== this.focusedFieldData.tabId) { return false; }