New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Destructing isDirty from formState causing error with cursor-position in masked input #46
Comments
@Danane84 Uh, its a insteresting issue. I will investigate that! |
It seems like the cursor goes to the start of your active input on every rerender, also it freezes the mouse hover placeholder if its showing when a rerender happens output.mp4In this video I used a Joi validation for testing, like this volume: Joi.number().min(50).max(100) I hope this helps someone figure what's happening bc I have no clue 🤣 My "solution" for now is setting in react-hook-form reValidateMode: 'onSubmit' |
Great solution! |
@eduardoborges maybe reopen this? revalidate |
@eduardoborges This issue is related to the recreation of the |
Hi,
i just bumped into the following bug: Destructing
formState: {isDirty}
from react hook form'suseForm
leads to an unexpected left-jump of the cursor position when entering the first value into a masked input, eg. typing 123456 will lead to a value of 234561.Here is a codesandbox with the error replicated: https://codesandbox.io/p/sandbox/friendly-galois-tzw59m
Please let me know if you need any further information!
Update: I just realized that the same bug occus after a yup validation error was triggered: So if I type something in the masked input, which has a
.required()
yup-validation rule and then delete the input, when the error is triggered, the cursor-position jumps unexpectedly one to the left.The text was updated successfully, but these errors were encountered: