From 610ec2bdf5841c8275073992e67c59fb47faa48c Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 29 Mar 2017 10:40:57 -0700 Subject: [PATCH 1/3] Fix popup behavior for Firefox Firefox does not support the `focused` parameter when opening a new window, and we don't actually require it for Chrome either, new popups are at the foreground by default already. --- app/scripts/lib/extension.js | 5 ++++- app/scripts/lib/notifications.js | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/scripts/lib/extension.js b/app/scripts/lib/extension.js index 4b670490f..6f8b5d800 100644 --- a/app/scripts/lib/extension.js +++ b/app/scripts/lib/extension.js @@ -11,4 +11,7 @@ */ const Extension = require('./extension-instance') -module.exports = new Extension() +const instance = new Extension() +window.METAMASK_EXTENSION = instance +module.exports = instance + diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js index 3db1ac6b5..33914846c 100644 --- a/app/scripts/lib/notifications.js +++ b/app/scripts/lib/notifications.js @@ -22,10 +22,12 @@ function show () { extension.windows.create({ url: 'notification.html', type: 'popup', - focused: true, width, height, }) + .catch((reason) => { + log.error("failed to create poupup", reason) + }) } }) } From daf22168b63d70669cf0bce17a17e0648aca584f Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 29 Mar 2017 10:42:02 -0700 Subject: [PATCH 2/3] Bump changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e27f5c04..0a54cf886 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Current Master +- Popup new transactions in Firefox. + ## 3.5.2 2017-3-28 - Fix bug where gas estimate totals were sometimes wrong. From 98dd684524fde7548442830fe01e1f3e24a6e67d Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 29 Mar 2017 10:42:43 -0700 Subject: [PATCH 3/3] Linted --- app/scripts/lib/notifications.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js index 33914846c..0ec01f3a7 100644 --- a/app/scripts/lib/notifications.js +++ b/app/scripts/lib/notifications.js @@ -26,7 +26,7 @@ function show () { height, }) .catch((reason) => { - log.error("failed to create poupup", reason) + log.error('failed to create poupup', reason) }) } })