Re-focus to last open tab before user was prompted for log in
This commit is contained in:
parent
b74efc1dbf
commit
7f98ce347d
|
@ -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':
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue