Skip to content

Commit

Permalink
Focus the notification popup if it's already open (#8318)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
Gudahtt authored Apr 11, 2020
1 parent 852277b commit e02a022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
Expand Down

0 comments on commit e02a022

Please sign in to comment.