From 50f06cb2be8f0cec91bf0fdaba7311a846868149 Mon Sep 17 00:00:00 2001 From: Trevor Jones Date: Fri, 2 Dec 2022 10:53:39 -0700 Subject: [PATCH] MDL-72906 Quiz: Prevent scrollbar on multichoice Remove negative margin from the "clear my choice" anchor. With the negative margin, when the containing box height is calculated the anchor's hidden style overflows beyond the boundary and triggers the overflow:auto to add a scroll bar. --- question/type/multichoice/renderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/question/type/multichoice/renderer.php b/question/type/multichoice/renderer.php index e6516b81a6b..a4822433ae8 100644 --- a/question/type/multichoice/renderer.php +++ b/question/type/multichoice/renderer.php @@ -323,7 +323,7 @@ class qtype_multichoice_single_renderer extends qtype_multichoice_renderer_base // Adds an hidden radio that will be checked to give the impression the choice has been cleared. $clearchoiceradio = html_writer::empty_tag('input', $clearchoiceradioattrs); $clearchoice = html_writer::link('#', get_string('clearchoice', 'qtype_multichoice'), - ['tabindex' => $linktabindex, 'role' => 'button', 'class' => 'btn btn-link ml-3 mt-n1 mb-n1']); + ['tabindex' => $linktabindex, 'role' => 'button', 'class' => 'btn btn-link ml-3 mt-n1']); $clearchoiceradio .= html_writer::label($clearchoice, $clearchoiceid); // Now wrap the radio and label inside a div.