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:
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user