Fix #50 : Problème avec la touche retour arrière

This commit is contained in:
JonathanMM 2022-03-02 18:28:39 +01:00
parent efa020f758
commit 3fa2c6ae6a

View file

@ -129,7 +129,7 @@ export default class Input {
if (touche === "Enter") { if (touche === "Enter") {
this.validerMot(); this.validerMot();
} else if (/^[A-Z]+$/.test(Dictionnaire.nettoyerMot(touche))) { } else if (/^[A-Z]$/.test(Dictionnaire.nettoyerMot(touche))) {
this.saisirLettre(touche); this.saisirLettre(touche);
} }
}).bind(this) }).bind(this)
@ -143,6 +143,7 @@ export default class Input {
let touche = event.key; let touche = event.key;
if (touche === "Backspace") { if (touche === "Backspace") {
event.preventDefault();
this.effacerLettre(); this.effacerLettre();
} }
}).bind(this) }).bind(this)