Skip to content

Commit

Permalink
#6288 Smooth scroll incorrectly works with new scrollbar (#6289)
Browse files Browse the repository at this point in the history
Fixes #6288
  • Loading branch information
novikov82 authored Dec 20, 2024
1 parent 13fb881 commit 2023254
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/survey-creator-core/src/components/scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export class ScrollViewModel {
private _scrollbarSizerElement: HTMLElement;
private _containerBodyResizeObserver: ResizeObserver;

private _lockScroll = false;

constructor() {
//this.dragTypeOverMe = this.row.dragTypeOverMe;
}
Expand All @@ -40,10 +42,15 @@ export class ScrollViewModel {
}

public onScrollContainer() {
this._lockScroll = true;
this._scrollbarElement.scrollTop = this._containerElementValue.scrollTop;
}

public onScrollScrollbar() {
if (this._lockScroll) {
this._lockScroll = false;
return;
}
this._containerElementValue.scrollTop = this._scrollbarElement.scrollTop;
}

Expand Down

0 comments on commit 2023254

Please sign in to comment.