Skip to content

Commit

Permalink
fix: do not autoscroll on event selection (#2234)
Browse files Browse the repository at this point in the history
Closes #2233
  • Loading branch information
cutterbl authored Jul 15, 2022
1 parent 33bc92a commit b85b1ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/TimeGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b85b1ff

Please sign in to comment.