question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't scroll on the scrollable dom that as zone add to editor

See original GitHub issue

monaco-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
    });
})

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
chenmy0917commented, Jan 26, 2021

@alexdima OK , I will try it, thank you~

0reactions
ricenoddlecommented, Jan 10, 2022

But the problem of stopPropagation is I cannot scroll the editor when I scrolled to the bottom of my OverlayWidget

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found