Skip to content

Commit

Permalink
fix: Chrome 1px scroll w Zoom level <100% didn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
gblazex committed Nov 24, 2015
1 parent 55065e4 commit a660055
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SmoothScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,12 +620,12 @@ var getScrollRoot = (function() {
document.body.appendChild(dummy);
var bodyScrollTop = document.body.scrollTop;
var docElScrollTop = document.documentElement.scrollTop;
window.scrollBy(0, 1);
window.scrollBy(0, 3);
if (document.body.scrollTop != bodyScrollTop)
(SCROLL_ROOT = document.body);
else
(SCROLL_ROOT = document.documentElement);
window.scrollBy(0, -1);
window.scrollBy(0, -3);
document.body.removeChild(dummy);
}
return SCROLL_ROOT;
Expand Down

1 comment on commit a660055

@RSickenberg
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all 👍

Please sign in to comment.