From 7f650756b15d8ee7187e095888108a0b07aa5a98 Mon Sep 17 00:00:00 2001 From: Stephen Glass Date: Sun, 6 Jul 2025 00:57:12 -0400 Subject: [PATCH] Fix scroll to on step change test Signed-off-by: Stephen Glass --- .../scaffolder-react/src/next/components/Stepper/Stepper.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx index 94ced3e415..1f36eb58d3 100644 --- a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx +++ b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx @@ -221,7 +221,7 @@ export const Stepper = (stepperProps: StepperProps) => { useEffect(() => { const main = document.querySelector('main'); - if (main) { + if (main && typeof main.scrollTo === 'function') { main.scrollTo({ top: 0, behavior: 'auto' }); } }, [activeStep]);