Skip to content

Commit

Permalink
Merge pull request vb#12 from martify/feature/ie-11-support
Browse files Browse the repository at this point in the history
Scroll cross-browser compatibility
  • Loading branch information
vb authored Feb 16, 2018
2 parents 7fa88b7 + 21eca3d commit d82d9ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions dist/lazyframe.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lazyframe",
"version": "1.1.4",
"version": "1.1.5",
"description": "Dependency-free library for lazyloading iframes",
"main": "dist/lazyframe.min.js",
"jsnext:main": "src/lazyframe.js",
Expand Down
4 changes: 2 additions & 2 deletions src/lazyframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ const Lazyframe = () => {

const onScroll = debounce(() => {

up = lastY < window.scrollY;
lastY = window.scrollY;
up = lastY < window.pageYOffset;
lastY = window.pageYOffset;

if (up) {
elements
Expand Down

0 comments on commit d82d9ba

Please sign in to comment.