diff --git a/static/app/components/core/form/formContext.ts b/static/app/components/core/form/formContext.ts index 227bb1b2de4f..984dbdae33ef 100644 --- a/static/app/components/core/form/formContext.ts +++ b/static/app/components/core/form/formContext.ts @@ -1,7 +1,21 @@ +import {createContext, useContext} from 'react'; // eslint-disable-next-line no-restricted-imports import {createFormHookContexts} from '@tanstack/react-form'; const {fieldContext, formContext, useFormContext, useFieldContext} = createFormHookContexts(); -export {fieldContext, formContext, useFormContext, useFieldContext}; +// Safari doesn't submit a form when the button has an explicit `form` attribute +// pointing at its own parent form. Only set the attribute when the button is +// rendered outside the