1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 12:13:45 +00:00

[PM-5189] Working through further issues on positioning of inline menu

This commit is contained in:
Cesar Gonzalez
2024-06-25 08:10:08 -05:00
parent b90900009b
commit 582cdf17dd
2 changed files with 7 additions and 3 deletions

View File

@@ -113,7 +113,7 @@ export type OverlayBackgroundExtensionMessageHandlers = {
getAutofillInlineMenuVisibility: () => void;
openAutofillInlineMenu: () => void;
closeAutofillInlineMenu: ({ message, sender }: BackgroundOnMessageHandlerParams) => void;
checkAutofillInlineMenuFocused: () => void;
checkAutofillInlineMenuFocused: ({ sender }: BackgroundSenderParam) => void;
focusAutofillInlineMenuList: () => void;
updateAutofillInlineMenuPosition: ({
message,

View File

@@ -90,7 +90,7 @@ export class OverlayBackground implements OverlayBackgroundInterface {
getAutofillInlineMenuVisibility: () => this.getInlineMenuVisibility(),
openAutofillInlineMenu: () => this.openInlineMenu(false),
closeAutofillInlineMenu: ({ message, sender }) => this.closeInlineMenu(sender, message),
checkAutofillInlineMenuFocused: () => this.checkInlineMenuFocused(),
checkAutofillInlineMenuFocused: ({ sender }) => this.checkInlineMenuFocused(sender),
focusAutofillInlineMenuList: () => this.focusInlineMenuList(),
updateAutofillInlineMenuPosition: ({ message, sender }) =>
this.updateInlineMenuPosition(message, sender),
@@ -518,7 +518,11 @@ export class OverlayBackground implements OverlayBackgroundInterface {
* Checks if the inline menu is focused. Will check the inline menu list
* if it is open, otherwise it will check the inline menu button.
*/
private checkInlineMenuFocused() {
private checkInlineMenuFocused(sender: chrome.runtime.MessageSender) {
if (sender.tab.id !== this.focusedFieldData?.tabId) {
return;
}
if (this.inlineMenuListPort) {
this.checkInlineMenuListFocused();