`element.focus()` not working in Form component example
Open
@romhml is already working on this.
Since Jul 28, 2025.
- Dominant language
- TypeScript
- Stars
- 6.9k
- Forks
- 1.1k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 57
Description
Environment
- Operating System: Windows_NT
- Node Version: v22.17.1
- Nuxt Version: -
- CLI Version: 3.27.0
- Nitro Version: -
- Package Manager: pnpm@10.13.1
- Browser: Microsoft Edge Version 138.0.3351.109 (Official build) (64-bit)
Is this bug related to Nuxt or Vue?
Vue
Version
v3.3.0
Reproduction
Navigate to the error-event example and click on submit. You will notice the element is scrolled to but not actually focused.
Description
The example provided in error-event of the Form component does not actually seem to focus the first element.
The example provided by MDN does however focus, so this does not seem to be a browser related issue.
Logging the element found in the onError does show the correct element was detected, so I am not sure what is going on.
Additional context
No response
Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.