Skip to content

Commit b85b1ff

Browse files
authored
fix: do not autoscroll on event selection (jquense#2234)
Closes jquense#2233
1 parent 33bc92a commit b85b1ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/TimeGrid.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,11 @@ export default class TimeGrid extends Component {
277277

278278
applyScroll() {
279279
// If auto-scroll is disabled, we don't actually apply the scroll
280-
if (this._scrollRatio != null && this.props.enableAutoScroll === true) {
280+
if (
281+
!this.props.selected &&
282+
this._scrollRatio != null &&
283+
this.props.enableAutoScroll === true
284+
) {
281285
const content = this.contentRef.current
282286
content.scrollTop = content.scrollHeight * this._scrollRatio
283287
// Only do this once

0 commit comments

Comments
 (0)