microsoft / microsoft/monaco-editor
[Bug] ResizeObserver loop completed with undelivered notifications.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Reproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not reproducible in the monaco editor playground
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response
Reproduction Steps
I initialize an editor in WebView2 using the following:
const options: monaco.editor.IStandaloneEditorConstructionOptions = {
value: 'test',
language: 'csharp',
theme: 'vs-dark',
automaticLayout: true,
contextmenu: false,
minimap: { enabled: false },
scrollBeyondLastLine: false,
};
I place the editor inside a resizable div and try to resize it. The console spews errors:
ResizeObserver loop completed with undelivered notifications.
Here's some pseudo-code for the html/style:
<div class="resizable">
<div class="code-editor" bind:this={container}></div>
</div>
<style>
.code-editor {
width: 100%;
height: 100%;
}
.resizable {
overflow: auto;
height: var(--me-default-height);
resize: vertical;
}
</style>
Actual (Problematic) Behavior
Resizing monaco-editor spams the console with errors. It only happens when the editor is being shrunk, not when it's being expanded.
Expected Behavior
I would expect no errors when resizing monaco editor.
Additional Context
This is all using WebView2.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing issue #4333 in WebView2 with automaticLayout enabled, using the provided resizable container and editor options, then compare shrinking and expanding behavior. Trace the resize handling and ResizeObserver notifications; done means resizing the editor no longer produces “ResizeObserver loop completed with undelivered notifications.”
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, html, javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100