Skip to content
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

Change of behaviour in 1.0.4 #46

Closed
mbuchetics opened this issue Jul 25, 2013 · 2 comments
Closed

Change of behaviour in 1.0.4 #46

mbuchetics opened this issue Jul 25, 2013 · 2 comments

Comments

@mbuchetics
Copy link

The commit 4707988 introduced a change of when the checks are run.
Previously, checks on a form field are only run once the user placed the cursor inside, made a change, or moved the cursor outside again. Plus, when the user submitted the form.
Now, the function formIsErrorFree calls runCheck on all listeners if their status is null.

You can see that change on example 3:
http://casperin.github.io/nod/ (here, 1.0.3 is still used)
http://jsfiddle.net/vb2hZ/ (this uses the latest version, 1.0.5)

If I enter "foo" (or anything else), it now immediately highlights an error on the dropdown, because I haven't selected a value there.
A more complex form that is empty at initialization, would be full with error messages before the user even has the chance to enter values.

I really don't like this behavior and have reverted back to 1.0.3 in my application. I understand that formIsErrorFree is used to programmatically check whether the form is valid and it that case it is totally valid to check all the form fields at once. But this should not be used internally whenever a change is triggered on a field.

@casperin
Copy link
Owner

I totally agree. It was an error on my part to release it like that (no unit tests, ouch) and it will be the first thing I would take a look at once I get my thesis over with. :)

@casperin
Copy link
Owner

@mbuchetics so I'm having a forced break from thesis, and doing some development on nod. That is, I'm rebuilding it from scratch in pure js. The behavior you describe here most likely won't be fixed for current versions of nod (unless I feel like it), but of course won't be present in the new version. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants