react-redux-form
react-redux-form copied to clipboard
Blur after form level error resets form validity
The Problem
When I submit a form that returns an API error, I use setErrors() on the form to be displayed using the Errors component.
The issue is that, if I submit by pressing Enter, and keep the last field focussed, when blurring, the forms validity is reset, so the error message is removed.
This is very noticeable on mobile devices. To simulate the interaction on mobile, when on the Last Name field, press Return, then click anywhere within the white space. This is the same as hitting Return on a mobile device then Done on iOS to hide the keyboard to get a better view of the error.
I have looked through the documentation and old issues and cannot find anything relevant.
Steps to Reproduce
- Go to sandbox
- Focus Last Name
- Press
Enter/Return - Click white area
Expected Behavior
Blurring should not reset the form validity
Actual Behavior
Error is removed as form validity is reset.
Reproducible Code Example
Happy to make a PR for this if required, would appreciate any pointers in the right direction if so.