1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 03:36:18 +02:00

Merge pull request #656 from MetaMask/i646-ClosePopupBug

Fix popup closing bug
This commit is contained in:
Kevin Serrano 2016-09-13 13:14:14 -07:00 committed by GitHub
commit d05dfc4eed
2 changed files with 12 additions and 3 deletions

View File

@ -2,6 +2,9 @@
## Current Master ## Current Master
- Fixed bug where opening MetaMask could close a non-metamask popup.
- Fixed memory leak that caused occasional crashes.
- Add a QR button to the Account detail screen - Add a QR button to the Account detail screen
## 2.11.1 2016-09-12 ## 2.11.1 2016-09-12

View File

@ -1,4 +1,6 @@
const extension = require('./extension') const extension = require('./extension')
const height = 500
const width = 360
const notifications = { const notifications = {
show, show,
@ -24,8 +26,8 @@ function show () {
url: 'notification.html', url: 'notification.html',
type: 'popup', type: 'popup',
focused: true, focused: true,
width: 360, width,
height: 500, height,
}) })
} }
@ -51,7 +53,11 @@ function getPopup(cb) {
} }
function getPopupIn(windows) { function getPopupIn(windows) {
return windows ? windows.find((win) => win.type === 'popup') : null return windows ? windows.find((win) => {
return (win && win.type === 'popup' &&
win.height === height &&
win.width === width)
}) : null
} }
function closePopup() { function closePopup() {