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

Fix bad state on 1st character where model != view #34

Merged
merged 2 commits into from
Aug 30, 2015

Conversation

ryan-kimber
Copy link
Contributor

When marking the input as mask-valid or mask-invalid, parseViewValue is checking to see if modelValue is empty, instead of checking to see if the proposed viewValue is empty.

This can cause the field to be marked as valid when the model is currently empty, but the proposed view value is invalid.

I've changed the parseViewValue function to now check that the 'value' from parseViewValue(value) is empty instead of checking the model value.

When first entering text into the field, it's common for the viewValue to be different than the model value. 

When testing the validity of the current value, the parseViewValue function was checking whether or not the model value was empty, instead of the view value.
…atch-1

Fix bad state on 1st character where model != view
candreoliveira added a commit that referenced this pull request Aug 30, 2015
Fix bad state on 1st character where model != view
@candreoliveira candreoliveira merged commit f9ddce8 into candreoliveira:master Aug 30, 2015
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

Successfully merging this pull request may close these issues.

2 participants