From: soufiane Date: Thu, 23 May 2024 08:57:20 +0000 (+0200) Subject: wait #6927 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=665e5b400362b8390b6df4baec21f49e101355be;p=fluidbook-toolbox-quiz.git wait #6927 --- 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) + }) } };