From 5d4a009a2e7f21eed2a51ad2fa9fc6a28bf5e874 Mon Sep 17 00:00:00 2001 From: Dmitry Kuzin Date: Tue, 8 Oct 2024 18:22:13 +0400 Subject: [PATCH] Try to fix f tests --- packages/survey-core/src/survey-element.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/survey-core/src/survey-element.ts b/packages/survey-core/src/survey-element.ts index 994e9ab412..9102d6f80c 100644 --- a/packages/survey-core/src/survey-element.ts +++ b/packages/survey-core/src/survey-element.ts @@ -234,7 +234,10 @@ export class SurveyElement extends SurveyElementCore implements ISurvey return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible, scrollIntoViewOptions, doneCallback); } public static ScrollElementToViewCore(el: HTMLElement, checkLeft: boolean, scrollIfVisible?: boolean, scrollIntoViewOptions?: ScrollIntoViewOptions, doneCallback?: () => void): boolean { - if (!el || !el.scrollIntoView) return false; + if (!el || !el.scrollIntoView) { + doneCallback && doneCallback(); + return false; + } const needScroll = SurveyElement.IsNeedScrollIntoView(el, checkLeft, scrollIfVisible); if (needScroll) { SurveyElement.ScrollIntoView(el, scrollIntoViewOptions, doneCallback);