Skip to content

Commit

Permalink
Focus the notification popup if it's already open
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 committed Apr 9, 2020
1 parent 6237c68 commit ec2f9d7
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 ec2f9d7

Please sign in to comment.