diff --git a/apps/scandic-web/components/TrackingSDK/hooks.ts b/apps/scandic-web/components/TrackingSDK/hooks.ts index 46b2482cd..40b9022d6 100644 --- a/apps/scandic-web/components/TrackingSDK/hooks.ts +++ b/apps/scandic-web/components/TrackingSDK/hooks.ts @@ -331,7 +331,7 @@ export function useFormTracking( }, [subscribe, formType, nameSuffix, formStarted]) useEffect(() => { - if (!formStarted || !lastAccessedField.current) return + if (!formStarted || !lastAccessedField.current || formState.isValid) return const lastField = lastAccessedField.current @@ -352,5 +352,5 @@ export function useFormTracking( window.removeEventListener("beforeunload", handleBeforeUnload) window.removeEventListener("visibilitychange", handleVisibilityChange) } - }, [formStarted, formType, nameSuffix]) + }, [formStarted, formType, nameSuffix, formState.isValid]) }