1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

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.
This commit is contained in:
Dan Finlay 2017-03-29 10:40:57 -07:00
parent 13ec2aaa12
commit 610ec2bdf5
2 changed files with 7 additions and 2 deletions

View File

@ -11,4 +11,7 @@
*/ */
const Extension = require('./extension-instance') const Extension = require('./extension-instance')
module.exports = new Extension() const instance = new Extension()
window.METAMASK_EXTENSION = instance
module.exports = instance

View File

@ -22,10 +22,12 @@ function show () {
extension.windows.create({ extension.windows.create({
url: 'notification.html', url: 'notification.html',
type: 'popup', type: 'popup',
focused: true,
width, width,
height, height,
}) })
.catch((reason) => {
log.error("failed to create poupup", reason)
})
} }
}) })
} }