Skip to content

Commit 6d81b07

Browse files
authored
fix: APP-581 scroll to top of page on next (#2607)
1 parent 04390ce commit 6d81b07

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

web-marketplace/src/components/templates/MultiStepTemplate/MultiStep.context.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ export function MultiStepProvider<T extends object>({
130130

131131
const handleBack = (): void => {
132132
goBack();
133+
window.scrollTo({ top: 0, behavior: 'smooth' });
133134
};
134135

135136
const handleSave = (
@@ -151,6 +152,7 @@ export function MultiStepProvider<T extends object>({
151152
const maxAllowed = Math.max(nextStep, maxAllowedStep);
152153
handleSave(formValues, maxAllowed, dataDisplay);
153154
handleNext();
155+
window.scrollTo({ top: 0, behavior: 'smooth' });
154156
};
155157

156158
// this reset does not clean the stored data, it simply forces the form to start

0 commit comments

Comments
 (0)