From da8b5ca2ec853e4960cdc475ed1b94497798bfbc Mon Sep 17 00:00:00 2001 From: Kevin Jilissen Date: Tue, 16 Sep 2025 20:47:43 +0200 Subject: [PATCH] Do not always consume the mouse wheel As both the page and the editor can have a scrollbar, the editor should not always consume it. This allows for scrolling the page when the editor has reached its limits. When we opt for a stretching editor without scroll, we will still need this option anyway. --- webapp/src/Twig/TwigExtension.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webapp/src/Twig/TwigExtension.php b/webapp/src/Twig/TwigExtension.php index 2d7df23586..5c5ba5ea3e 100644 --- a/webapp/src/Twig/TwigExtension.php +++ b/webapp/src/Twig/TwigExtension.php @@ -868,6 +868,7 @@ public function codeEditor( const editor = monaco.editor.create(element, { value: content, scrollbar: { + alwaysConsumeMouseWheel: false, vertical: 'auto', horizontal: 'auto' }, @@ -944,6 +945,7 @@ public function showDiff(string $id, SubmissionFile $newFile, SubmissionFile $ol const diffEditor = monaco.editor.createDiffEditor( document.getElementById("__EDITOR__"), { scrollbar: { + alwaysConsumeMouseWheel: false, vertical: 'auto', horizontal: 'auto' },