From a660055b46a06533979bb9f6ec2c35fdba59b77c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Galambosi?= Date: Tue, 24 Nov 2015 11:06:37 +0100 Subject: [PATCH] fix: Chrome 1px scroll w Zoom level <100% didn't work --- SmoothScroll.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SmoothScroll.js b/SmoothScroll.js index 7fd3848..745170d 100644 --- a/SmoothScroll.js +++ b/SmoothScroll.js @@ -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;