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

Fixes popups not showing when screen size is odd (#6312)

This commit is contained in:
William Monti Souza 2019-03-17 17:00:51 -04:00 committed by Whymarrh Whitby
parent ea34d3b0ff
commit 98699fbbc0

View File

@ -26,8 +26,8 @@ class NotificationManager {
extension.windows.update(popup.id, { focused: true })
} else {
const {screenX, screenY, outerWidth, outerHeight} = window
const notificationTop = screenY + (outerHeight / 2) - (NOTIFICATION_HEIGHT / 2)
const notificationLeft = screenX + (outerWidth / 2) - (NOTIFICATION_WIDTH / 2)
const notificationTop = Math.round(screenY + (outerHeight / 2) - (NOTIFICATION_HEIGHT / 2))
const notificationLeft = Math.round(screenX + (outerWidth / 2) - (NOTIFICATION_WIDTH / 2))
const cb = (currentPopup) => { this._popupId = currentPopup.id }
// create new notification popup
const creation = extension.windows.create({