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
Describe the bug
I have to revalidate form after input change on my form to enable or disable submit button. My global config has "focusInvalidField" set to false. Works perfectrly fine on Mozilla. On the last version of Chrome, whenever I type in my input, focus is lost.
To Reproduce
On Chrome
Having set Just Validate config properly
Having input handler on my fields
Using revalidate() to enable or disable submit button
Expected behavior
Should not lose focus on the input i'm typing in whenever "focusInvalidField" is set to false
The text was updated successfully, but these errors were encountered:
Hi, I looked into this. Actually this is not related to focusInvalidField config. The reason why this happens is when revalidate() method called and lockForm: true - each element gets disabled attribute during the validation (this is useful for async validations). That's why browsers could reset the focus.
To avoid this it makes sense to set lockForm: false, as you mentioned. And this is logical, because you don't need to lock the form actually if you do extra actions on inputs.
I will think to add some setting to enable/disable a submit button and a callback if the fields changed to avoid adding extra listeners.
Describe the bug
I have to revalidate form after input change on my form to enable or disable submit button. My global config has "focusInvalidField" set to false. Works perfectrly fine on Mozilla. On the last version of Chrome, whenever I type in my input, focus is lost.
To Reproduce
On Chrome
Expected behavior
Should not lose focus on the input i'm typing in whenever "focusInvalidField" is set to false
The text was updated successfully, but these errors were encountered: