Skip to content

Commit da8b5ca

Browse files
committed
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.
1 parent 43ecaaa commit da8b5ca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

webapp/src/Twig/TwigExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,7 @@ public function codeEditor(
868868
const editor = monaco.editor.create(element, {
869869
value: content,
870870
scrollbar: {
871+
alwaysConsumeMouseWheel: false,
871872
vertical: 'auto',
872873
horizontal: 'auto'
873874
},
@@ -944,6 +945,7 @@ public function showDiff(string $id, SubmissionFile $newFile, SubmissionFile $ol
944945
const diffEditor = monaco.editor.createDiffEditor(
945946
document.getElementById("__EDITOR__"), {
946947
scrollbar: {
948+
alwaysConsumeMouseWheel: false,
947949
vertical: 'auto',
948950
horizontal: 'auto'
949951
},

0 commit comments

Comments
 (0)