Skip to content

Commit

Permalink
Support IE11 window scroll offset (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
marnusw authored and naqvitalha committed Nov 19, 2018
1 parent 84ab6d1 commit 8535de7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/web/scrollcomponent/ScrollEventNormalizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export class ScrollEventNormalizer {
nativeEvent: {
contentOffset: {
get x(): number {
return window.scrollX;
return window.scrollX === undefined ? window.pageXOffset : window.scrollX;
},
get y(): number {
return window.scrollY;
return window.scrollY === undefined ? window.pageYOffset : window.scrollY;
},
},
contentSize: {
Expand Down

0 comments on commit 8535de7

Please sign in to comment.