You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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]);
}
The text was updated successfully, but these errors were encountered:
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.
I added the following line of code to fix it:
The text was updated successfully, but these errors were encountered: