Skip to content

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

Description

@lakshme

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions