Skip to content
Snippets Groups Projects
Commit 21936fb0 authored by Philip Kaluđerčić's avatar Philip Kaluđerčić :u7121:
Browse files

Only trigger a virtual click when clicking on answer text

parent 3c170bc0
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// ./LICENSE for more details. // ./LICENSE for more details.
"use strict"; "use strict";
const version = "$Id: quiz.js,v 1.9 2024/01/15 16:34:27 oj14ozun Exp oj14ozun $"; const version = "$Id: quiz.js,v 1.10 2024/01/15 19:25:55 oj14ozun Exp oj14ozun $";
const answers = document.getElementById("answers"); const answers = document.getElementById("answers");
const text = document.getElementById("text"); const text = document.getElementById("text");
...@@ -128,6 +128,7 @@ function next() { ...@@ -128,6 +128,7 @@ function next() {
// prepare answer // prepare answer
answ.classList.add("option"); answ.classList.add("option");
answ.innerHTML = o.option; answ.innerHTML = o.option;
answ.onclick = _ => input.click();
// prepare comment // prepare comment
let fallback = "Falsch"; let fallback = "Falsch";
...@@ -148,7 +149,6 @@ function next() { ...@@ -148,7 +149,6 @@ function next() {
li.appendChild(input); li.appendChild(input);
li.appendChild(answ); li.appendChild(answ);
li.appendChild(comm); li.appendChild(comm);
li.onclick = _ => input.click();
answers.appendChild(li); answers.appendChild(li);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment