]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wait #6927
authorsoufiane <soufiane@cubedesigners.com>
Thu, 23 May 2024 08:51:16 +0000 (10:51 +0200)
committersoufiane <soufiane@cubedesigners.com>
Thu, 23 May 2024 08:51:16 +0000 (10:51 +0200)
js/quiz.screens.js

index 3e9481d0b782219eabd440580d90156d1ea336e0..40b8413930d3dfee93ecfd12268d8e43523096e4 100644 (file)
@@ -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++)
+            })
+        }
     }
 };