diff --git a/src/background/runtime.background.ts b/src/background/runtime.background.ts index 89a1674cbc..a704613e34 100644 --- a/src/background/runtime.background.ts +++ b/src/background/runtime.background.ts @@ -79,6 +79,10 @@ export default class RuntimeBackground { await this.processMessage(retryItem.msg, retryItem.sender, null); await BrowserApi.closeLoginTab(); + + if (retryItem?.sender?.tab?.id) { + await BrowserApi.focusSpecifiedTab(retryItem.sender.tab.id); + } } break; case 'addToLockedVaultPendingNotifications': diff --git a/src/browser/browserApi.ts b/src/browser/browserApi.ts index 87e269ec5d..c48572641f 100644 --- a/src/browser/browserApi.ts +++ b/src/browser/browserApi.ts @@ -111,6 +111,10 @@ export class BrowserApi { chrome.tabs.remove(tabToClose); } + static async focusSpecifiedTab(tabId: number) { + chrome.tabs.update(tabId, { active: true, highlighted: true }); + } + static closePopup(win: Window) { if (BrowserApi.isWebExtensionsApi && BrowserApi.isFirefoxOnAndroid) { // Reactivating the active tab dismisses the popup tab. The promise final