From 40f3b148dbbfde1c8f09503ba3e56a66ab74626d Mon Sep 17 00:00:00 2001 From: soufiane Date: Thu, 23 May 2024 10:51:16 +0200 Subject: [PATCH] wait #6927 --- js/quiz.screens.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/js/quiz.screens.js b/js/quiz.screens.js index 3e9481d..40b8413 100644 --- a/js/quiz.screens.js +++ b/js/quiz.screens.js @@ -92,13 +92,6 @@ QuizScreens.prototype = { $this.nextQuestion(); } }); - - if(this.getActiveScreenType() === "multiple") { - $(".list-item").removeAttr("tabindex") - $(".active-screen .list-item").each(function(index) { - $(this).attr('tabindex', index++) - }) - } }, instantReview: function (review) { @@ -202,6 +195,7 @@ QuizScreens.prototype = { $this.resetForm(); $this.currentQuestionAnswers = []; $this.quiz.progressbar.update(); + $this.updateTabindexToQuestionMultiple(); if (screen === 'outro') { $this.outro.initEvents(); @@ -359,6 +353,15 @@ QuizScreens.prototype = { reset: function () { $("#screens").html(this.screensHTML); + }, + + updateTabindexToQuestionMultiple: function() { + if(this.getActiveScreenType() === "multiple") { + $(".list-item").removeAttr("tabindex") + this.activeScreen.find(".list-item").each(function(index) { + $(this).attr('tabindex', index++) + }) + } } }; -- 2.39.5