diff --git a/.changeset/clever-moose-act.md b/.changeset/clever-moose-act.md new file mode 100644 index 0000000000..4c23441a63 --- /dev/null +++ b/.changeset/clever-moose-act.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-js': patch +--- + +Reset OTP field when pressing "Cancel" in VerifyDomainPage inside ``. diff --git a/packages/clerk-js/src/ui.retheme/components/OrganizationProfile/VerifyDomainPage.tsx b/packages/clerk-js/src/ui.retheme/components/OrganizationProfile/VerifyDomainPage.tsx index c551ab7143..2ccd4399f9 100644 --- a/packages/clerk-js/src/ui.retheme/components/OrganizationProfile/VerifyDomainPage.tsx +++ b/packages/clerk-js/src/ui.retheme/components/OrganizationProfile/VerifyDomainPage.tsx @@ -186,7 +186,11 @@ export const VerifyDomainPage = withCardStateProvider(() => { textVariant='buttonExtraSmallBold' type='reset' isDisabled={status.isLoading || success} - onClick={wizard.prevStep} + onClick={() => { + codeControlState.clearFeedback(); + codeControl.reset(); + wizard.prevStep(); + }} localizationKey={localizationKeys('userProfile.formButtonReset')} /> diff --git a/packages/clerk-js/src/ui/components/OrganizationProfile/VerifyDomainPage.tsx b/packages/clerk-js/src/ui/components/OrganizationProfile/VerifyDomainPage.tsx index c551ab7143..2ccd4399f9 100644 --- a/packages/clerk-js/src/ui/components/OrganizationProfile/VerifyDomainPage.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationProfile/VerifyDomainPage.tsx @@ -186,7 +186,11 @@ export const VerifyDomainPage = withCardStateProvider(() => { textVariant='buttonExtraSmallBold' type='reset' isDisabled={status.isLoading || success} - onClick={wizard.prevStep} + onClick={() => { + codeControlState.clearFeedback(); + codeControl.reset(); + wizard.prevStep(); + }} localizationKey={localizationKeys('userProfile.formButtonReset')} />