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 event not fired when field is cleared by plugin #5

Open
lakshme opened this issue Sep 14, 2012 · 0 comments
Open

Change event not fired when field is cleared by plugin #5

lakshme opened this issue Sep 14, 2012 · 0 comments

Comments

@lakshme
Copy link

lakshme commented Sep 14, 2012

When a value is entered in the field greater than the specified vMax, then the autonumeric plugin automatically clears the field by setting value=''
But it does not fire a change event at this time.
I need to listen to and bind the value of this field to an attribute in my class. Since I have no way of knowing that the value has been cleared to '' (since there was no event fired), I still have the old value in my attribute.

So made a change locally where we fire the event in all cases as follows :

if ( groupedValue !== origValue ) {
iv.val( groupedValue );
iv.change(); ---------------------------------- my change
}
if ( groupedValue !== holder.inVal ) {
iv.change();
delete holder.inVal;
}

Please can you have a look at this and provide a fix ? Thanks. Am using version 1.7.1.

-Lakshme

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

1 participant