Open
Description
a form submit event provides an event.submitter
property, which can be passed to new FormData(event.currentTarget, event.submitter)
.
currently, react's FormEvent<HTMLFormElement>
does not expose event.submitter
- it can only be accessed via (event.nativeEvent as SubmitEvent).submitter
.
React version: 19.1
Steps To Reproduce
Link to code example: https://github.com/stefanprobst/issue-react-form-event-submitter
- clone above repo,
pnpm install && pnpm run dev
- click the submit button, and see that the nativeEvent has a submitter property, while the react synthetic event does not
The current behavior
the submit event does not have a submitter
property
The expected behavior
the submit event's submitter
property references the submit button (like the native SubmitEvent does)