-
Notifications
You must be signed in to change notification settings - Fork 422
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
can-value becomes out of sync when a compute rejects the new value #887
Comments
matthewp
added a commit
to matthewp/canjs
that referenced
this issue
Apr 16, 2014
This change ensures that when the compute value is set due to a user typing into an input, that the input's value is checked against the new value and that they are the same. Otherwise it is possible for the compute to reject the input's value (or set it to something else entirely) and the input and compute value become out of sync. Fixes canjs#887
matthewp
added a commit
to matthewp/canjs
that referenced
this issue
Apr 16, 2014
This change ensures that when the compute value is set due to a user typing into an input, that the input's value is checked against the new value and that they are the same. Otherwise it is possible for the compute to reject the input's value (or set it to something else entirely) and the input and compute value become out of sync. Fixes canjs#887
This was referenced Feb 10, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://jsfiddle.net/6PeBb/1/
This demo includes a compute that rejects non-numbers. If you type in a non-number value the compute's setter will return the old value.
This means the
<input>
and the compute are not in sync.The text was updated successfully, but these errors were encountered: