Can't scroll on the scrollable dom that as zone add to editor
See original GitHub issuemonaco-editor version: v0.21.2 Browser: Google Chrome v87.0.4280.141(x86_64) OS: macOS Playground code that reproduces the issue:
var originalModel = monaco.editor.createModel("This line is removed on the right.\njust some text\nabcd\nefgh\nSome more text", "text/plain");
var modifiedModel = monaco.editor.createModel("just some text\nabcz\nzzzzefgh\nSome more text\nThis line is removed on the left.", "text/plain");
var diffEditor = monaco.editor.createDiffEditor(document.getElementById("container"), {
// You can optionally disable the resizing
enableSplitViewResizing: false,
// Render the diff inline
renderSideBySide: false
});
diffEditor.setModel({
original: originalModel,
modified: modifiedModel
});
var modifiedEditor = diffEditor.getModifiedEditor();
var div = document.createElement('div');
var child = document.createElement('div');
div.style.height = '50px';
div.style['overflow-y'] = 'scroll';
child.style.height = '100px';
div.appendChild(child);
modifiedEditor.changeViewZones((accessor) => {
accessor.addZone({
afterLineNumber: 2,
heightInPx: 50,
domNode: div
});
})
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
How to universally enable scrolling on website that disabled ...
With Chrome, one way to automatically re-enable scrolling on a website is to download the Tampermonkey extension, then add this script (click "Install...
Read more >That's Just How I Scroll | CSS-Tricks
In a scrollbox or any area where the content is larger than its container, how do we indicate that there is more content...
Read more >scroll-behavior - CSS: Cascading Style Sheets - MDN Web Docs
The scroll-behavior CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs.
Read more >Scrollable element is keyboard accessible[proposed] | ACT Rule
To ensure there is some element from which arrow keys can be used to control the scroll position, focus must be on or...
Read more >Element size and scrolling - The Modern JavaScript Tutorial
Properties scrollLeft/scrollTop are the width/height of the hidden, scrolled out part of the element. On the picture below we can see ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@alexdima OK , I will try it, thank you~
But the problem of
stopPropagation
is I cannot scroll the editor when I scrolled to the bottom of my OverlayWidget