Skip to content

Commit

Permalink
Fix(utils): Chrome < 44 not support scrollingElement
Browse files Browse the repository at this point in the history
  • Loading branch information
pangjian committed Sep 25, 2019
1 parent 82ce396 commit 3f0a9bd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,12 @@ function find(ctx, tagName, iterator) {


function getWindowScrollingElement() {
if (IE11OrLess) {
return document.documentElement;
let scrollingElement = document.scrollingElement;

if (scrollingElement) {
return scrollingElement
} else {
return document.scrollingElement;
return document.documentElement
}
}

Expand Down

0 comments on commit 3f0a9bd

Please sign in to comment.