From c4c023a3f4755247934d5052f09cc00fd9edec00 Mon Sep 17 00:00:00 2001 From: Lars Willighagen Date: Tue, 4 Jun 2024 15:59:20 +0200 Subject: [PATCH] fix(ui): fix "(de)select all" taxa buttons --- src/app.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app.js b/src/app.js index a7a66b9..68a5367 100644 --- a/src/app.js +++ b/src/app.js @@ -49,12 +49,16 @@ export class App { }) document.getElementById('options-answers-select').addEventListener('click', () => { document.querySelectorAll('#options-answers input').forEach(($input) => { - $input.click() + if (!$input.checked) { + $input.click() + } }) }) document.getElementById('options-answers-deselect').addEventListener('click', () => { document.querySelectorAll('#options-answers input').forEach(($input) => { - $input.click() + if ($input.checked) { + $input.click() + } }) }) document.body.addEventListener('keyup', (event) => {