mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
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).
This commit is contained in:
parent
852277b2ae
commit
e02a0221fc
@ -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()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user