-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
monaco-editor version: Self-hosted 0.26.1 & Monaco Playground 0.27.0
Browser: Edge 92
OS: Windows 20H2
Playground code that reproduces the issue:
-
Navigate to https://microsoft.github.io/monaco-editor/playground.html
-
Run the following code in the left panel of the playground.
monaco.editor.create(document.getElementById("container"), {
value: "aaaa" + "\n".repeat(100) + "aaaa", // or any other value that makes the editor scrollable
scrollbar: { alwaysConsumeMouseWheel: false }, // <- this option is necessary
language: "text"
});-
Inspect page element
<body>, setelement.styleoverflow: unset; height: 3000px;(or any other value that makes the page scrollable)

-
Now, when scrolling in the right panel of the playground with trackpad two-finger scrolling, there is a chance that the whole page scrolls instead of the editor. (Although the editor still have some lines not yet displayed on the scrolling direction)
-
This unexpected behavior has a higher reproduction chance when scrolling downward at low-speed. The browser's Inertial Scrolling may also trigger this behavior.
-
This behavior cannot reproduce when
alwaysConsumeMouseWheel: true. But withalways...: true, the Monaco editor will not respond to low-speed two-finger scrolling.