From b365e2742f2522191d7b48b820d501e9891e7478 Mon Sep 17 00:00:00 2001 From: Nick Diehl <47604184+ncdiehl11@users.noreply.github.com> Date: Wed, 20 Nov 2024 11:53:53 -0500 Subject: [PATCH] fix(protocol-designer): add scroll to top functionality between parts (#16906) Scroll to top when continuing on a multi-part step form Closes RQA-3555 --- .../pages/Designer/ProtocolSteps/StepForm/StepFormToolbox.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepFormToolbox.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepFormToolbox.tsx index 5b58ac60c5a..2088409227e 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepFormToolbox.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepFormToolbox.tsx @@ -254,8 +254,8 @@ export function StepFormToolbox(props: StepFormToolboxProps): JSX.Element { setShowFormErrors(false) } else { setShowFormErrors(true) - handleScrollToTop() } + handleScrollToTop() } else { handleSaveClick() } @@ -304,6 +304,7 @@ export function StepFormToolbox(props: StepFormToolboxProps): JSX.Element { onClick={() => { setToolboxStep(0) setShowFormErrors(false) + handleScrollToTop() }} > {i18n.format(t('shared:back'), 'capitalize')}