You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting up a form with onSubmit validation causes strange validation behavior when submitting the form. The validation appears briefly before disappearing again. It's like the submit validation kicks in, and the blur then clears it.
Then to reproduce, focus on either of the two form fields and hit enter on your keyboard, no need to type anything in the fields.
The repro code lives in app/index.tsx.
To "fix it" you can comment out the 2 onBlurs (onBlur={field.handleBlur}) in that file. This is obviously not really a fix, but shows intended vs actual behaviour.
Activity
crutchcorn commentedon May 10, 2026
This happens even when using
onSubmitEditing. This is really bizarre because it doesn't happen in React (non RNW). Let me dig in on whycrutchcorn commentedon May 10, 2026
Figured it out: It's not a bug with us but a behavior from RNW causing havoc.
When a form is submitted, you get a
blurevent, causing issues with our library.To fix it, add this property to your
TextFieldin RNW:You'll get a note from your IDE that it's deprecated, but the RN (not web) alternative is not part of the library yet:
necolas/react-native-web#2817
Watch that issue and use
blurOnSubmit={false}for now to fix this.Cheers!