From 7b37d8021d01e44b766e8a67a9b3cd4438f8b8d5 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Thu, 8 Jan 2026 01:23:40 +0100 Subject: [PATCH] Disable input fields when result is shown in QuizRunner --- client/src/components/QuizRunner.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/components/QuizRunner.tsx b/client/src/components/QuizRunner.tsx index 47e0e9f..0f31829 100644 --- a/client/src/components/QuizRunner.tsx +++ b/client/src/components/QuizRunner.tsx @@ -115,6 +115,7 @@ function QuestionRenderer({ placeholder="Type the missing text" value={response || ''} onChange={(e) => onChange(e.target.value)} + disabled={showResult} /> {Array.isArray(payload.options) && payload.options.length > 0 && (
Hints: {payload.options.join(' • ')}
@@ -141,6 +142,7 @@ function QuestionRenderer({ const current = response && typeof response === 'object' ? response : {}; onChange({ ...current, [idx]: e.target.value }); }} + disabled={showResult} > {rightOptions.map((opt, optionIdx) => ( @@ -175,6 +177,7 @@ function QuestionRenderer({ checked={response === idx} onChange={() => onChange(idx)} name={`q-${question.id}`} + disabled={showResult} /> {option}