Scroll event is not propagating to parent
monaco-editor version: 0.20.0 Browser: OS: Playground code that reproduces the issue: go here - https://microsoft.github.io/monaco-editor/
Scroll the editor using mouse. Once editor is scrolled to end ( horizontal or vertical ), page should scroll but that is not happening.
Achieving scroll parent( or any scroll listener in the DOM hierarchy) after the editor scrolling reaches the end of the document is fairly simple:
monaco.editor.create(document.getElementById("container"), {
value: "function hello() {\n\talert('Hello world!');\n}",
language: "javascript",
scrollbar:{
alwaysConsumeMouseWheel: false, // defaults is true, false enables the behavior you describe
}
});
This HTML is just to showcase the behavior:
<div id="container" style="height:100%;"><div style="height:50%;"><div id="container" style="height:100%;"></div></div></div>
Interesting observation, the behavior should be as you mentioned, otherwise provide scroll end feedback like the bouncy scroll end browser like Chrome does.
This solved my issue. Thank you