I'm having a problem on IE related possibly to the inputmask.
The problem I think can be solved by telling the InputMask to not update the value (don't throw onChange) when pressing the TAB key, this shouldn't be necessary since the mask is applied every time the user presses a key.
CAn you please tell me how to do this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is done because the field value may be changed by pasting text with the mouse...
Anyway, if you want to disable, change the JST_MASK_VALIDATE_ON_BLUR value to false.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is a problem. Even though I put the JST_MASK_VALIDATE_ON_BLUR value to false, the keyup event is thrown on the control where the cursor ends up positioned. So when the next control has a mask, it executes the event onKeyUp there.
This is on IE. I already fixed it by putting this condition on the onKeyUp function, like this:
//The KeyUp event will apply the mask
function onKeyUp (event) {
if (window.event) {
event = window.event;
}
//alert(event.type + this.ignore);
//Check if it's not an ignored key
var keyCode = typedCode(event);
if (this.ignore != true && keyCode != 9) {
applyMask(this.mask, false);
}
//Check for extra function on keydown
if (this.mask.keyUpFunction != null) {
var ret = this.mask.keyUpFunction(event, this.mask);
if (ret == false) {
return false;
}
}
return true;
}
I don't know if it's going to break anything else, but I couldn't come up with a better solution in so little time I have.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Really, the TAB key applies the mask...
The best solution is to append 9 to the array JST_IGNORED_KEY_CODES.
Perhaps I'll implement it on the next version.
Please, let me know if it works...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having a problem on IE related possibly to the inputmask.
The problem I think can be solved by telling the InputMask to not update the value (don't throw onChange) when pressing the TAB key, this shouldn't be necessary since the mask is applied every time the user presses a key.
CAn you please tell me how to do this?
This is done because the field value may be changed by pasting text with the mouse...
Anyway, if you want to disable, change the JST_MASK_VALIDATE_ON_BLUR value to false.
There is a problem. Even though I put the JST_MASK_VALIDATE_ON_BLUR value to false, the keyup event is thrown on the control where the cursor ends up positioned. So when the next control has a mask, it executes the event onKeyUp there.
This is on IE. I already fixed it by putting this condition on the onKeyUp function, like this:
//The KeyUp event will apply the mask
function onKeyUp (event) {
if (window.event) {
event = window.event;
}
//alert(event.type + this.ignore);
//Check if it's not an ignored key
var keyCode = typedCode(event);
if (this.ignore != true && keyCode != 9) {
applyMask(this.mask, false);
}
//Check for extra function on keydown
if (this.mask.keyUpFunction != null) {
var ret = this.mask.keyUpFunction(event, this.mask);
if (ret == false) {
return false;
}
}
return true;
}
I don't know if it's going to break anything else, but I couldn't come up with a better solution in so little time I have.
Really, the TAB key applies the mask...
The best solution is to append 9 to the array JST_IGNORED_KEY_CODES.
Perhaps I'll implement it on the next version.
Please, let me know if it works...
Ah! There's a new version with that array. I'm using 2.0.4. I will try the new version when I'm sure it works OK with everything.