mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 09:43:23 +00:00
[PM-5189] Fixing issue where unlocking account can focus the wrong field
This commit is contained in:
@@ -607,11 +607,18 @@ class OverlayBackground implements OverlayBackgroundInterface {
|
|||||||
private async openOverlay(isFocusingFieldElement = false, isOpeningFullOverlay = false) {
|
private async openOverlay(isFocusingFieldElement = false, isOpeningFullOverlay = false) {
|
||||||
const currentTab = await BrowserApi.getTabFromCurrentWindowId();
|
const currentTab = await BrowserApi.getTabFromCurrentWindowId();
|
||||||
|
|
||||||
await BrowserApi.tabSendMessageData(currentTab, "openAutofillOverlay", {
|
await BrowserApi.tabSendMessage(
|
||||||
isFocusingFieldElement,
|
currentTab,
|
||||||
isOpeningFullOverlay,
|
{
|
||||||
authStatus: await this.getAuthStatus(),
|
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;
|
ciphers?: any;
|
||||||
isInlineMenuHidden?: boolean;
|
isInlineMenuHidden?: boolean;
|
||||||
overlayElement?: string;
|
overlayElement?: string;
|
||||||
|
isFocusingFieldElement?: boolean;
|
||||||
|
authStatus?: AuthenticationStatus;
|
||||||
|
isOpeningFullOverlay?: boolean;
|
||||||
data?: {
|
data?: {
|
||||||
authStatus?: AuthenticationStatus;
|
|
||||||
isFocusingFieldElement?: boolean;
|
|
||||||
isOverlayCiphersPopulated?: boolean;
|
isOverlayCiphersPopulated?: boolean;
|
||||||
direction?: "previous" | "next" | "current";
|
direction?: "previous" | "next" | "current";
|
||||||
isOpeningFullOverlay?: boolean;
|
|
||||||
forceCloseOverlay?: boolean;
|
forceCloseOverlay?: boolean;
|
||||||
autofillOverlayVisibility?: number;
|
autofillOverlayVisibility?: number;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
|||||||
private autofillFieldKeywordsMap: WeakMap<AutofillField, string> = new WeakMap();
|
private autofillFieldKeywordsMap: WeakMap<AutofillField, string> = new WeakMap();
|
||||||
private eventHandlersMemo: { [key: string]: EventListener } = {};
|
private eventHandlersMemo: { [key: string]: EventListener } = {};
|
||||||
readonly extensionMessageHandlers: AutofillOverlayContentExtensionMessageHandlers = {
|
readonly extensionMessageHandlers: AutofillOverlayContentExtensionMessageHandlers = {
|
||||||
openAutofillOverlay: ({ message }) => this.openAutofillOverlay(message.data),
|
openAutofillOverlay: ({ message }) => this.openAutofillOverlay(message),
|
||||||
addNewVaultItemFromOverlay: () => this.addNewVaultItem(),
|
addNewVaultItemFromOverlay: () => this.addNewVaultItem(),
|
||||||
blurMostRecentOverlayField: () => this.blurMostRecentOverlayField(),
|
blurMostRecentOverlayField: () => this.blurMostRecentOverlayField(),
|
||||||
bgUnlockPopoutOpened: () => this.blurMostRecentOverlayField(true),
|
bgUnlockPopoutOpened: () => this.blurMostRecentOverlayField(true),
|
||||||
|
|||||||
Reference in New Issue
Block a user