diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index 422e01a549..cdbf96ef91 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -288,11 +288,6 @@ 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; @@ -957,7 +952,7 @@ class Core { props.left.height = dom.left.offsetHeight; props.right.height = dom.right.offsetHeight; props.top.height = dom.top.clientHeight || -props.border.top; - props.bottom.height = dom.bottom.clientHeight || -props.border.bottom; + props.bottom.height = Math.round(dom.bottom.getBoundingClientRect().height) || dom.bottom.clientHeight || -props.border.bottom; // TODO: compensate borders when any of the panels is empty. @@ -1349,7 +1344,7 @@ class Core { */ _updateScrollTop() { // recalculate the scrollTopMin - const scrollTopMin = Math.min(this.props.centerContainer.height - this.props.center.height, 0); // is negative or zero + const scrollTopMin = Math.min(this.props.centerContainer.height - this.props.border.top - this.props.border.bottom - this.props.center.height, 0); // is negative or zero if (scrollTopMin != this.props.scrollTopMin) { // in case of bottom orientation, change the scrollTop such that the contents // do not move relative to the time axis at the bottom @@ -1367,7 +1362,6 @@ 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; }