diff --git a/apps/browser/src/autofill/background/abstractions/overlay.background.ts b/apps/browser/src/autofill/background/abstractions/overlay.background.ts index 5b0ed0cd4c0..3313d3405ca 100644 --- a/apps/browser/src/autofill/background/abstractions/overlay.background.ts +++ b/apps/browser/src/autofill/background/abstractions/overlay.background.ts @@ -99,6 +99,10 @@ export type OverlayBackgroundExtensionMessageHandlers = { checkIsFieldCurrentlyFilling: () => boolean; getAutofillInlineMenuVisibility: () => void; + updateAutofillInlineMenuPosition: ({ + message, + sender, + }: BackgroundOnMessageHandlerParams) => Promise; toggleAutofillInlineMenuHidden: ({ message, sender }: BackgroundOnMessageHandlerParams) => void; checkIsAutofillInlineMenuButtonVisible: ({ sender }: BackgroundSenderParam) => void; checkIsAutofillInlineMenuListVisible: ({ sender }: BackgroundSenderParam) => void; @@ -140,10 +144,6 @@ export type OverlayContentScriptPortMessageHandlers = { closeAutofillInlineMenu: ({ message, port }: PortOnMessageHandlerParams) => void; checkAutofillInlineMenuFocused: () => void; focusAutofillInlineMenuList: () => void; - updateAutofillInlineMenuPosition: ({ - message, - port, - }: PortOnMessageHandlerParams) => Promise; }; export type InlineMenuButtonPortMessageHandlers = { diff --git a/apps/browser/src/autofill/background/overlay.background.ts b/apps/browser/src/autofill/background/overlay.background.ts index 43bb8956fa8..fd8aeb5f0fb 100644 --- a/apps/browser/src/autofill/background/overlay.background.ts +++ b/apps/browser/src/autofill/background/overlay.background.ts @@ -83,6 +83,8 @@ export class OverlayBackground implements OverlayBackgroundInterface { checkIsFieldCurrentlyFilling: () => this.checkIsFieldCurrentlyFilling(), getAutofillInlineMenuVisibility: () => this.getInlineMenuVisibility(), + updateAutofillInlineMenuPosition: ({ message, sender }) => + this.updateInlineMenuPosition(message, sender), toggleAutofillInlineMenuHidden: ({ message, sender }) => this.toggleInlineMenuHidden(message, sender), checkIsAutofillInlineMenuButtonVisible: ({ sender }) => @@ -110,8 +112,6 @@ export class OverlayBackground implements OverlayBackgroundInterface { closeAutofillInlineMenu: ({ message, port }) => this.closeInlineMenu(port.sender, message), checkAutofillInlineMenuFocused: () => this.checkInlineMenuFocused(), focusAutofillInlineMenuList: () => this.focusInlineMenuList(), - updateAutofillInlineMenuPosition: ({ message, port }) => - this.updateInlineMenuPosition(message, port.sender), }; private readonly inlineMenuButtonPortMessageHandlers: InlineMenuButtonPortMessageHandlers = { closeAutofillInlineMenu: ({ message, port }) => this.closeInlineMenu(port.sender, message), diff --git a/apps/browser/src/autofill/services/autofill-overlay-content.service.ts b/apps/browser/src/autofill/services/autofill-overlay-content.service.ts index 56f6839dc4d..4f1e27babea 100644 --- a/apps/browser/src/autofill/services/autofill-overlay-content.service.ts +++ b/apps/browser/src/autofill/services/autofill-overlay-content.service.ts @@ -562,7 +562,7 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ * Updates the position of the inline menu button. */ private updateInlineMenuButtonPosition() { - this.sendPortMessage("updateAutofillInlineMenuPosition", { + void this.sendExtensionMessage("updateAutofillInlineMenuPosition", { overlayElement: AutofillOverlayElement.Button, }); } @@ -571,7 +571,7 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ * Updates the position of the inline menu list. */ private updateInlineMenuListPosition() { - this.sendPortMessage("updateAutofillInlineMenuPosition", { + void this.sendExtensionMessage("updateAutofillInlineMenuPosition", { overlayElement: AutofillOverlayElement.List, }); }