-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
masked element's "change" event ignored when using "reverse" option #3
Comments
Hi! @khafancoder Well, this is interesting. I'm using event namespaces (http://api.jquery.com/event.namespace/) exclusively to not cause conflict. I will investigate this bug and I will try to fix it as soon as possible! Thank you! Igor |
Hi @khafancoder! |
Dear @igorescobar I think the problem still exists, you can use the above code and entering "111111" into the text input. I've noticed the bug also occurs in some other case even the reverse option has not been used. for example: $("#input1").mask("999,999,999", { reverse: false}); entering "1111" into the text input doesn't fire the change event. |
Are you using jQuery mask with whitch version of jQuery? |
I've tested it with jQuery 1.5.1 & 1.8.1 |
@khafancoder |
after testing with other browsers it seems that Firefox hasn't any problem with that, but the bug occurs in Google Chrome (v21.0) and IE (v8) |
I will be doing a new roll of tests arround this issue but after doing a little research around this problem it seems to have a lot of people having troubles with jquery change. (http://api.jquery.com/change/) Wish me luck! |
Problem solved, new version was generated, have fun! ;) |
thanks a lot |
i tested in version 1.3.0 and nothing happens :( |
I'm having the same problem... |
Seem to be a quite long this issue has been discovered, but please pay attention to your default value or to the maxlength property of the input. |
Having this same exact problem in Chrome with v1.13.4. Using jQuery v1.11.0 The comma is where it breaks. 3 numbers the on change event works, anything more it does not. Usage: $(".elm").mask("000,000", {reverse: true}); I even tried using another method, but the reverse set to true breaks it this way as well. $('.elm').mask('NNNcNNN', {
'translation': {
N: {
pattern: /[0-9]/
},
c: {
pattern: /[,]/,
fallback: ','
}
},
reverse: true
}); Best alternate solution I could come up with was to add an onchange event directly on the element that points to a function in the JavaScript. |
i have the same problem in jquery v3.5.0 and jquery-mask v1.14.16 |
after applying masks which includes separator chars with the reverse option=true, the input's "change" event would not be triggered anymore :
$("#input1").mask("999,999,999", { reverse: true });
$("#input1").change(function()
{
alert("value changed"); //ignored
});
The text was updated successfully, but these errors were encountered: