]> source.dussan.org Git - sonarqube.git/commitdiff
Fix sidebar position helper in IE
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Tue, 10 Oct 2017 12:43:30 +0000 (14:43 +0200)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Tue, 10 Oct 2017 12:43:30 +0000 (14:43 +0200)
server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx

index a3e9d99d0e25762cab7bf5fdd69c972616d755fc..5f7b2476f5bd77ec3c99246ab266a7cf26771dde 100644 (file)
@@ -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() {