From d004d4957139858adf3199c5af3d6ec7c8958def Mon Sep 17 00:00:00 2001 From: Arthur Cheung Date: Fri, 3 Jan 2020 12:46:00 +1100 Subject: [PATCH 1/2] Added flag to programatic scrolling to avoid infinite scroll during redraw. (#238) --- lib/timeline/Core.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index 995b3755ac..b8b16d4708 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -287,6 +287,10 @@ class Core { */ function onMouseScrollSide(event) { if (!me.options.verticalScroll) return; + if(me._isProgramaticallyScrolled){ + me._isProgramaticallyScrolled = false; + return; + } event.preventDefault(); if (me.isActive()) { const adjusted = -event.target.scrollTop; @@ -1355,7 +1359,7 @@ class Core { this.dom.left.parentNode.scrollTop = -this.props.scrollTop; this.dom.right.parentNode.scrollTop = -this.props.scrollTop; } - + this._isProgramaticallyScrolled = true; return this.props.scrollTop; } From ecbf0eb6ab7a9eb394bd16da0cf01ddabb2533b3 Mon Sep 17 00:00:00 2001 From: Yotam Berkowitz Date: Sat, 18 Jan 2020 22:10:33 +0200 Subject: [PATCH 2/2] Update Core.js --- lib/timeline/Core.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index b8b16d4708..4c534e739c 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -287,10 +287,12 @@ class Core { */ function onMouseScrollSide(event) { if (!me.options.verticalScroll) return; - if(me._isProgramaticallyScrolled){ + + if (me._isProgramaticallyScrolled) { me._isProgramaticallyScrolled = false; return; } + event.preventDefault(); if (me.isActive()) { const adjusted = -event.target.scrollTop;