Controlled components do not get auto-focused on submit
See original GitHub issueDescribe the bug
When using uncontrolled components, handleSubmit focuses the first invalid field in the form. Example screenshot:

However, for controlled components using <Controller> the fields do not get focused. Example screenshot:

To Reproduce Steps to reproduce the behavior:
- Use a controlled component with
<Controller> - Trigger
handleSubmit
Codesandbox link https://codesandbox.io/s/beautiful-worker-22hi3
Expected behavior Controlled components receive focus in the same way uncontrolled components do.
Desktop (please complete the following information):
- OS: macOS 10.15.3
- Browser Chrome
- Version 80.0.3987.116 (Official Build) (64-bit)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
3 ways to autofocus an input in React that ALMOST always work!
First off, what is focus? This input is focus ed, but no text is selected. If the user starts typing, the text they...
Read more >Set focus on input field of the form in controlled component
Here is the on submit handler. I want to set focus on input field. Please tell me the more right way doing this...
Read more >How to autofocus using React Hooks - LogRocket Blog
The first way we can get more control over autofocus is with the useCallback() Hook. Here is the same form with our new...
Read more >4 Ways to Set Focus on an Input Field After Rendering in React
Autofocus using class component. First, we need to make our App.js file a class component. To do so, just paste the below code...
Read more >autofocus - HTML: HyperText Markup Language | MDN
If applied to multiple elements the first one will receive focus. Note: The autofocus attribute applies to all elements, not just form controls....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

That’s not precise as well, because you can do it yourself at useEffect as long as you get to hold of the errors and ref (controlled input).
anyway, let’s looking forward for the next update.
Read the doc