From 1eca2e934c3e026f43091708fc313522a491f79e Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 6 Sep 2023 15:55:36 +0200 Subject: [PATCH] fix: disable last step button wizard after submission --- src/lib/layout/wizard.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/layout/wizard.svelte b/src/lib/layout/wizard.svelte index 25067cf9d6..149192fe39 100644 --- a/src/lib/layout/wizard.svelte +++ b/src/lib/layout/wizard.svelte @@ -74,8 +74,13 @@ wizard.setInterceptor(null); if (isLastStep) { + $wizard.nextDisabled = true; trackEvent('wizard_finish'); dispatch('finish'); + //Reactivate button in case there are errors + setTimeout(() => { + $wizard.nextDisabled = false; + }, 2000); } else { trackEvent('wizard_next'); $wizard.step++;