From b85b1ff884862c8116e0e571e0715499f4e7d5f4 Mon Sep 17 00:00:00 2001 From: Steve 'Cutter' Blades Date: Fri, 15 Jul 2022 13:11:31 -0500 Subject: [PATCH] fix: do not autoscroll on event selection (#2234) Closes #2233 --- src/TimeGrid.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/TimeGrid.js b/src/TimeGrid.js index ce68957ca..36a7ba7be 100644 --- a/src/TimeGrid.js +++ b/src/TimeGrid.js @@ -277,7 +277,11 @@ export default class TimeGrid extends Component { applyScroll() { // If auto-scroll is disabled, we don't actually apply the scroll - if (this._scrollRatio != null && this.props.enableAutoScroll === true) { + if ( + !this.props.selected && + this._scrollRatio != null && + this.props.enableAutoScroll === true + ) { const content = this.contentRef.current content.scrollTop = content.scrollHeight * this._scrollRatio // Only do this once