This is for a typing test, where if you hit the backspace key you are penalized, but even if you hit backspace 10 times, it is only one penalty. It is working fine in IE, Chrome, Safari for Windows, and Opera - but not in Firefox... I tried putting setTimeout on it, but it didn't help.
}).keyup(function(event) {
if (event.which === 8 || event.keyCode === 8) {
if ((lastLetterWhich !== 8 && event.which === 8) || (lastLetterKeycode !== 8 && event.keyCode === 8)) {
correctedErrors += 1;
alert('worfks');
}
lastLetterWhich = 8;
lastLetterKeycode = 8;
}