Skip to content

Commit

Permalink
fix(form-builder): point slug focus to current field
Browse files Browse the repository at this point in the history
When the slug field was focused, it used the current (root) path for the focus path,
which prevented the input from actually opening inside of arrays, as well as presence
indication not showing up over the field.

Fixes #2379.
  • Loading branch information
rexxars committed Mar 24, 2021
1 parent 783d516 commit 5b15898
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const SlugInput = React.forwardRef(function SlugInput(
updateSlug,
])

const handleFocus = React.useCallback(() => onFocus(), [onFocus])
const handleFocus = React.useCallback(() => onFocus(['current']), [onFocus])

return (
<ChangeIndicatorCompareValueProvider
Expand Down

2 comments on commit 5b15898

@vercel
Copy link

@vercel vercel bot commented on 5b15898 Mar 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

test-studio – ./

test-studio.sanity.build
test-studio-git-next.sanity.build

@vercel
Copy link

@vercel vercel bot commented on 5b15898 Mar 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

perf-studio – ./

perf-studio-git-next.sanity.build
perf-studio.sanity.build

Please sign in to comment.