diff options
Diffstat (limited to 'server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx b/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx index a3e9d99d0e2..5f7b2476f5b 100644 --- a/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx +++ b/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx @@ -48,7 +48,10 @@ export default class ScreenPositionHelper extends React.PureComponent<Props> { if (!containerPos) { return { top: 0, left: 0 }; } - return { top: window.scrollY + containerPos.top, left: window.scrollX + containerPos.left }; + return { + top: window.pageYOffset + containerPos.top, + left: window.pageXOffset + containerPos.left + }; }; render() { |