I use the following to restricts user to enter only some characters. When I press tab, the cursor does not point to next control (in Mozilla). But it works fine in IE.
Perhaps if you start with something like:
if (e.keyCode === 9) { // TAB
return true;
}
I would recommend trying e.keyCode
instead of e.which
. Here is a SO link that describes a good method of getting the key strike into a single variable regardless: jQuery Event Keypress: Which key was pressed?