We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec31040 commit 350b567Copy full SHA for 350b567
packages/sanity/src/desk/panes/document/documentPanel/documentViews/FormView.tsx
@@ -106,8 +106,14 @@ export function FormView(props: FormViewProps) {
106
const formRef = useRef<null | HTMLDivElement>(null)
107
108
useEffect(() => {
109
- focusFirstDescendant(formRef.current!)
110
- }, [])
+ // Only focus on the first descendant if there is not already a focus path
+ // This is to avoid stealing focus from intent links
111
+ if (ready && !formState?.focusPath.length) {
112
+ focusFirstDescendant(formRef.current!)
113
+ }
114
+ // We only want to run it on first mount
115
+ // eslint-disable-next-line react-hooks/exhaustive-deps
116
+ }, [ready])
117
118
// const after = useMemo(
119
// () =>
0 commit comments