From 5910897bb6967e7ebb64d427306350e793103c40 Mon Sep 17 00:00:00 2001 From: wmsouza Date: Sat, 16 Mar 2019 18:37:00 -0400 Subject: [PATCH] Fixes popups not showing when screen size is odd --- app/scripts/lib/notification-manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scripts/lib/notification-manager.js b/app/scripts/lib/notification-manager.js index 758979973658..721d109a1a95 100644 --- a/app/scripts/lib/notification-manager.js +++ b/app/scripts/lib/notification-manager.js @@ -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({