]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wip #6927
authorsoufiane <soufiane@cubedesigners.com>
Tue, 21 May 2024 13:43:49 +0000 (15:43 +0200)
committersoufiane <soufiane@cubedesigners.com>
Tue, 21 May 2024 13:43:49 +0000 (15:43 +0200)
js/quiz.accessibility.js

index 6ca5b7cf1694138792d15afb890a0d51a2653e77..8d1400194f4a3d7d4eb4f242a01d1bc95d1ff65d 100644 (file)
@@ -25,10 +25,11 @@ QuizAccessibility.prototype = {
 
                 if (key === 'ENTER') {
                     console.log("enter 2")
-                    if ($this.quiz.utils.isEnabled($(this))) {
-                        $(':focus').find('[aria-keyshortcuts="' + key + '"]').click();
+                    let el = $(':focus').find('[aria-keyshortcuts="' + key + '"]')
+                    if ($this.quiz.utils.isEnabled(el)) {
+                        el.click();
+                        return true;
                     }
-                    return true;
                 }
             }
         });