From 04bf1ea5f4fc51b5815e2f00d13c2bc48600e4e2 Mon Sep 17 00:00:00 2001 From: John Hildenbiddle Date: Fri, 2 Oct 2020 14:20:57 -0500 Subject: [PATCH] Fix scroll event end value Fixes #1383 --- src/core/event/scroll.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/event/scroll.js b/src/core/event/scroll.js index 96cdade5c..bd6661918 100644 --- a/src/core/event/scroll.js +++ b/src/core/event/scroll.js @@ -18,7 +18,8 @@ function scrollTo(el, offset = 0) { enableScrollEvent = false; scroller = new Tweezer({ start: window.pageYOffset, - end: el.getBoundingClientRect().top + window.pageYOffset - offset, + end: + Math.round(el.getBoundingClientRect().top) + window.pageYOffset - offset, duration: 500, }) .on('tick', v => window.scrollTo(0, v))