From 36ed693e501d2deebf8bf8c6c3f55dab63759750 Mon Sep 17 00:00:00 2001 From: NikolaBorislavovHristov Date: Mon, 19 Nov 2018 16:31:49 +0200 Subject: [PATCH] popup position diff fixed --- src/common/Popup/Popup.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/Popup/Popup.js b/src/common/Popup/Popup.js index d8ba3dfcd..e8e9eeca5 100644 --- a/src/common/Popup/Popup.js +++ b/src/common/Popup/Popup.js @@ -54,12 +54,13 @@ class Popup extends Component { return; } + const bodyRect = document.body.getBoundingClientRect(); const labelRect = this.labelRef.current.getBoundingClientRect(); const labelPosition = { left: labelRect.x, top: labelRect.y, - right: document.body.offsetWidth - (labelRect.x + labelRect.width), - bottom: document.body.offsetHeight - (labelRect.y + labelRect.height) + right: bodyRect.width - (labelRect.x + labelRect.width), + bottom: bodyRect.height - (labelRect.y + labelRect.height) }; const menuRect = this.menuRef.current.getBoundingClientRect(); const menuStyle = {