final-form / final-form/react-final-form
Programmatic submit does not work in React 17
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
# Are you submitting a **bug report** or a **feature request**?
Bug
### What is the current behavior?
Submission using `form.dispatchEvent(new Event('submit', { cancelable: true }))` does not work after upgrading to React 17.
Hit the
 button here to see it do nothing:
https://codesandbox.io/s/react-final-form-external-submit-button-forked-kcrsu?file=/index.js
### What is the expected behavior?
It submits the form, as it did prior to React 17. You can view this behavior by changing the React version in the sandbox.
### Sandbox Link
https://codesandbox.io/s/react-final-form-external-submit-button-forked-kcrsu?file=/index.js
### What's your environment?
RFF 6.5.2
FF 4.20.1
React 17
### Other information
Sandbox is an updated version from https://final-form.org/docs/react-final-form/faq#via-documentgetelementbyid. No other changes.
Contributor guide
Assessment
This issue has not been assessed yet.