Skip to content

IE not work #3

@michalwroblewski

Description

@michalwroblewski

It is the resolution of problem

$(this).keypress(function (e) {
var k = e.charCode || e.keyCode || e.which;
var pos = $(this).caret();
if (!k){
return true;
}
var part1 = this.value.substring(0, pos.begin);
var part2 = this.value.substring(pos.end, this.value.length);
if (!mask.test(part1 + String.fromCharCode(k) + part2)){
return false;
}else{
return true;
}
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions