Conditional form inputs lose focus on validation #10772
Unanswered
alxvallejo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Wondering if there's a way to get around this, but I have a conditional form that goes away on a successful submit to show a confirmation component (pretty standard use case).
Here's a replicated example: https://codesandbox.io/s/prod-silence-wd3gn3?file=/src/Inputs.jsx
Notice how when you type the password, at the 8 character minimum, the form loses focus. (Ignore the yup stuff, was just experimenting)
So, pretty basic use case, and validation breaks the focus of the form. What's the workaround?
Beta Was this translation helpful? Give feedback.
All reactions