From 665e5b400362b8390b6df4baec21f49e101355be Mon Sep 17 00:00:00 2001 From: soufiane Date: Thu, 23 May 2024 10:57:20 +0200 Subject: [PATCH] wait #6927 --- js/quiz.screens.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/js/quiz.screens.js b/js/quiz.screens.js index 0f65edc..32f1079 100644 --- a/js/quiz.screens.js +++ b/js/quiz.screens.js @@ -35,6 +35,8 @@ QuizScreens.prototype = { // enabled click on item $(".list-item").css("pointer-events","auto").find('label').css("background-color",standardColor) + this.updateTabindexToQuestionMultiple(); + // Réinitialiser les réponses $(document).on("click", ".btn.reset", function (e) { @@ -195,7 +197,6 @@ QuizScreens.prototype = { $this.resetForm(); $this.currentQuestionAnswers = []; $this.quiz.progressbar.update(); - $this.updateTabindexToQuestionMultiple(); if (screen === 'outro') { $this.outro.initEvents(); @@ -356,14 +357,11 @@ QuizScreens.prototype = { }, updateTabindexToQuestionMultiple: function() { - if(this.getActiveScreenType() === "multiple") { - $(".list-item").removeAttr("tabindex") - let counter = 0; - this.activeScreen.find(".list-item").each(function(index) { - counter++ - $(this).attr('tabindex', counter) - }) - } + let counter = 0; + $(".question-multiple .list-item").each(function() { + counter++ + $(this).attr('tabindex', counter) + }) } }; -- 2.39.5