From 045fc2f1be822a27e0f5a3203ee1c2f57c078c56 Mon Sep 17 00:00:00 2001 From: Aleksey Novikov Date: Thu, 19 Dec 2024 19:01:20 +0300 Subject: [PATCH] #6288 Smooth scroll incorrectly works with new scrollbar Fixes #6288 --- packages/survey-creator-core/src/components/scroll.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/survey-creator-core/src/components/scroll.ts b/packages/survey-creator-core/src/components/scroll.ts index a3af245ad6..20b603352a 100644 --- a/packages/survey-creator-core/src/components/scroll.ts +++ b/packages/survey-creator-core/src/components/scroll.ts @@ -17,6 +17,8 @@ export class ScrollViewModel { private _scrollbarSizerElement: HTMLElement; private _containerBodyResizeObserver: ResizeObserver; + private _lockScroll = false; + constructor() { //this.dragTypeOverMe = this.row.dragTypeOverMe; } @@ -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; }