Fix scroll to on step change test
Signed-off-by: Stephen Glass <stephen@stephen.glass>
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user