Skip to content

element.focus() not working in Form component example #4612

@ISOR3X

Description

@ISOR3X

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingp2-mediumNotable issue or useful enhancementv3#1289

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions