fix: helper.js was updating form.answer

This commit is contained in:
Neale Pickett 2023-11-15 09:58:41 -07:00
parent bae0fb25c6
commit 6045000564
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@
<ul id="files"></ul>
<p>Puzzle by <span id="authors">[loading]</span></p>
</section>
<form>
<form class="submit-answer">
<label for="answer">Answer:</label>
<input type="text" name="answer" id="answer"> <span class="answer_ok"></span>
<br>

View File

@ -211,7 +211,7 @@ async function init() {
window.setanswer = (str => SetAnswer(str))
window.checkAnswer = (str => window.app.puzzle.IsPossiblyCorrect(str))
for (let form of document.querySelectorAll("form.answer")) {
for (let form of document.querySelectorAll("form.submit-answer")) {
form.addEventListener("submit", formSubmitHandler)
for (let e of form.querySelectorAll("[name=answer]")) {
e.addEventListener("input", answerInputHandler)