Closed
Description
When I have "5.000,00" as the current value, the oldValue is 500,00. If I press backspace, val will be 500,00; which is equal to oldValue, so that changed will not be true.
- @Version: v1.14.3
I added the following line of code to fix it:
callbacks: function (e) {
var val = p.val(),
changed = val !== oldValue, <-- this line will be afected by the change below
defaultArgs = [val, e, el, options],
callback = function (name, criteria, args) {
if (typeof options[name] === 'function' && criteria) {
options[name].apply(this, args);
}
oldValue = val; // CODE ADDED
};
callback('onChange', changed === true, defaultArgs);
callback('onKeyPress', changed === true, defaultArgs);
callback('onComplete', val.length === mask.length, defaultArgs);
callback('onInvalid', p.invalid.length > 0, [val, e, el, p.invalid, options]);
}
Metadata
Metadata
Assignees
Labels
No labels