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
I'm using your plugin with inputmask 3.0.55 on a form that allows grade entry for tests in a class. I have fields that must allow either a timed score (such as MM:SS format) or an "X" to indicate that a particular student did not complete the test. I am replacing long-standing code that did not work with IE 11 or Chrome, so there is a lot of data in the wild and many existing users who are familiar with this functionality and so I can't change it; I must allow a time (in a variety of user-selected formats) or an upper- or lowercase X.
This all works fine, and having multiple masks is very cool (thanks!), except that a couple of lines of event handling code in inputmask-multi are preventing me from entering uppercase letters.
In the mask function, lines 195 and 198 cause a "return true" if e.shiftKey is true... but that will be true even if the shift key is being held down in order to uppercase a letter. I changed that section of code to the following:
if (e.ctrlKey || k == opts.keyCode.SHIFT || e.altKey) {
return true;
}
} else if (e.type == "keypress" && (e.ctrlKey || k == opts.keyCode.SHIFT || e.altKey)) {
return true;
}
and it all works great. Without that change, the code exited before ever calling the keypressEvent function in inputmask, so my letter mask (with /[xX]/ validator) always failed for uppercase X (but worked fine for lowercase x).
Is this a reasonable change to make? Should the other key references here also use the opts.keyCode values or are they best left as they are?
Thanks,
Ann
The text was updated successfully, but these errors were encountered:
This is an issue for the jquery.inputmask. The file jquery.inputmask-multi.js has nothing todo with this project. This project only supports the earlier inputmask.
Hello,
I'm using your plugin with inputmask 3.0.55 on a form that allows grade entry for tests in a class. I have fields that must allow either a timed score (such as MM:SS format) or an "X" to indicate that a particular student did not complete the test. I am replacing long-standing code that did not work with IE 11 or Chrome, so there is a lot of data in the wild and many existing users who are familiar with this functionality and so I can't change it; I must allow a time (in a variety of user-selected formats) or an upper- or lowercase X.
This all works fine, and having multiple masks is very cool (thanks!), except that a couple of lines of event handling code in inputmask-multi are preventing me from entering uppercase letters.
In the mask function, lines 195 and 198 cause a "return true" if e.shiftKey is true... but that will be true even if the shift key is being held down in order to uppercase a letter. I changed that section of code to the following:
and it all works great. Without that change, the code exited before ever calling the keypressEvent function in inputmask, so my letter mask (with /[xX]/ validator) always failed for uppercase X (but worked fine for lowercase x).
Is this a reasonable change to make? Should the other key references here also use the opts.keyCode values or are they best left as they are?
Thanks,
Ann
The text was updated successfully, but these errors were encountered: