mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-30 22:41:33 +01:00
[PM-5189] Fixing issue where unlocking account can focus the wrong field
This commit is contained in:
parent
4914636800
commit
4c165617f0
@ -607,11 +607,18 @@ class OverlayBackground implements OverlayBackgroundInterface {
|
||||
private async openOverlay(isFocusingFieldElement = false, isOpeningFullOverlay = false) {
|
||||
const currentTab = await BrowserApi.getTabFromCurrentWindowId();
|
||||
|
||||
await BrowserApi.tabSendMessageData(currentTab, "openAutofillOverlay", {
|
||||
isFocusingFieldElement,
|
||||
isOpeningFullOverlay,
|
||||
authStatus: await this.getAuthStatus(),
|
||||
});
|
||||
await BrowserApi.tabSendMessage(
|
||||
currentTab,
|
||||
{
|
||||
command: "openAutofillOverlay",
|
||||
isFocusingFieldElement,
|
||||
isOpeningFullOverlay,
|
||||
authStatus: await this.getAuthStatus(),
|
||||
},
|
||||
{
|
||||
frameId: this.focusedFieldData?.tabId === currentTab.id ? this.focusedFieldData.frameId : 0,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -14,12 +14,12 @@ export type AutofillExtensionMessage = {
|
||||
ciphers?: any;
|
||||
isInlineMenuHidden?: boolean;
|
||||
overlayElement?: string;
|
||||
isFocusingFieldElement?: boolean;
|
||||
authStatus?: AuthenticationStatus;
|
||||
isOpeningFullOverlay?: boolean;
|
||||
data?: {
|
||||
authStatus?: AuthenticationStatus;
|
||||
isFocusingFieldElement?: boolean;
|
||||
isOverlayCiphersPopulated?: boolean;
|
||||
direction?: "previous" | "next" | "current";
|
||||
isOpeningFullOverlay?: boolean;
|
||||
forceCloseOverlay?: boolean;
|
||||
autofillOverlayVisibility?: number;
|
||||
};
|
||||
|
@ -39,7 +39,7 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
||||
private autofillFieldKeywordsMap: WeakMap<AutofillField, string> = new WeakMap();
|
||||
private eventHandlersMemo: { [key: string]: EventListener } = {};
|
||||
readonly extensionMessageHandlers: AutofillOverlayContentExtensionMessageHandlers = {
|
||||
openAutofillOverlay: ({ message }) => this.openAutofillOverlay(message.data),
|
||||
openAutofillOverlay: ({ message }) => this.openAutofillOverlay(message),
|
||||
addNewVaultItemFromOverlay: () => this.addNewVaultItem(),
|
||||
blurMostRecentOverlayField: () => this.blurMostRecentOverlayField(),
|
||||
bgUnlockPopoutOpened: () => this.blurMostRecentOverlayField(true),
|
||||
|
Loading…
Reference in New Issue
Block a user