From e02a0221fc99fb65782302cc88430478f0a75d38 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Sat, 11 Apr 2020 20:43:55 -0300 Subject: [PATCH] Focus the notification popup if it's already open (#8318) Any action in the background that would have opened the notification window will now focus the window instead if it was already open. Previously it would leave the window unfocused. This was particularly inconvenient when taking multiple actions in quick succession that all require confirmations (e.g. triggering multiple transactions). --- app/scripts/background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/background.js b/app/scripts/background.js index abf2c8ce97c0..b34f5848a899 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -458,7 +458,7 @@ function setupController (initState, initLangCode) { async function triggerUi () { const tabs = await platform.getActiveTabs() const currentlyActiveMetamaskTab = Boolean(tabs.find((tab) => openMetamaskTabsIDs[tab.id])) - if (!popupIsOpen && !currentlyActiveMetamaskTab && !notificationIsOpen) { + if (!popupIsOpen && !currentlyActiveMetamaskTab) { await notificationManager.showPopup() } }