I have the folling code, when it triggers the tab key is not working in firefox but works in chrome.
HTML:
<input id="contactPhone" onkeypress="validationPhone(event)" data-bind='value: phone' type="text" class="form-control" maxlength='10'>
Here is the JS code:
validationPhone = function (x) {
var evt = window.event || x;
if ((evt.which > 46 && evt.which < 58) || evt.which == 8) {
return true;
}
else {
evt.preventDefault();
}
}