Skip to content
Extraits de code Groupes Projets
Valider 55b16b00 rédigé par Dan Hansen's avatar Dan Hansen
Parcourir les fichiers

Firefox sends charCode 0 when backspace is pressed

parent 52a3996a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -11,6 +11,7 @@ var Validation = { ...@@ -11,6 +11,7 @@ var Validation = {
}, },
events: { events: {
usernameKeypress: function(evt) { usernameKeypress: function(evt) {
if(evt.charCode === 0) { return; }
if(!Validation.rules.username.characters.test(this.value + String.fromCharCode(evt.charCode))) { if(!Validation.rules.username.characters.test(this.value + String.fromCharCode(evt.charCode))) {
evt.preventDefault(); evt.preventDefault();
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter