Skip to content

Commit 692ee54

Browse files
winkler1ryanflorence
authored andcommitted
Get scroll pos in a more portable way.
1 parent 31e1eb2 commit 692ee54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/utils/getWindowScrollPosition.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ function getWindowScrollPosition() {
1111
);
1212

1313
return {
14-
x: window.scrollX,
15-
y: window.scrollY
14+
x: window.pageXOffset || document.documentElement.scrollLeft,
15+
y: window.pageYOffset || document.documentElement.scrollTop
1616
};
1717
}
1818

0 commit comments

Comments
 (0)