The vocab RPG game is awesome, thanks btw. When RPGing on iOS, the default apostrophe key on the English keyboard doesn't register as the "correct" one. Example for won't here.
When entering the neutral vertical apostrophe via long-press in iOS, the answer is validated as correct.
I'm never worked in typescript but is possible to wrap either the answer value or input value with a function that fixes weird apostrophe entries?
// Setup answer input
const answer = this.add.dom(x, VocabRPGGame.HEIGHT - 30).createFromCache("answer_input")
const answerField = document.getElementById("answerField") as HTMLInputElement
const checkAnswer = () => {
const input: string = answerField.value.trim()
if (!input) return
// Check the answer
let correct = false
if (Array.isArray(this.word.en)) {
// There's multiple correct answers, see if it matches any of them
if (this.word.en.includes(input)) correct = true
} else if (this.word.en == input) {
correct = true
}
The apostrophe in the Japanese keyboard is oddly slanted -- maybe this trips the validation function also.
The vocab RPG game is awesome, thanks btw. When RPGing on iOS, the default apostrophe key on the English keyboard doesn't register as the "correct" one. Example for won't here.
When entering the neutral vertical apostrophe via long-press in iOS, the answer is validated as correct.
I'm never worked in typescript but is possible to wrap either the answer value or input value with a function that fixes weird apostrophe entries?
The apostrophe in the Japanese keyboard is oddly slanted -- maybe this trips the validation function also.