Skip to content

Commit bf78085

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 1ce25b3 commit bf78085

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
@@ -872,6 +872,7 @@ public function codeEditor(
872872
const editor = monaco.editor.create(element, {
873873
value: content,
874874
scrollbar: {
875+
alwaysConsumeMouseWheel: false,
875876
vertical: 'auto',
876877
horizontal: 'auto'
877878
},
@@ -972,6 +973,7 @@ public function showDiff(string $id, SubmissionFile $newFile, SubmissionFile $ol
972973
const diffEditor = monaco.editor.createDiffEditor(
973974
document.getElementById("__EDITOR__"), {
974975
scrollbar: {
976+
alwaysConsumeMouseWheel: false,
975977
vertical: 'auto',
976978
horizontal: 'auto'
977979
},

0 commit comments

Comments
 (0)