[Bug] DiffEditor does not emit dispose event
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start with the Monaco Editor Playground reproduction using createDiffEditor, onDidDispose, and dispose. Verify the missing event behavior, then trace the DiffEditor disposal path and add coverage where appropriate; done means disposing the diff editor triggers the registered callback and the relevant tests pass.
Written by the indexing model from the issue text.
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
Monaco Editor Playground Code
var originalModel = monaco.editor.createModel(
`import { FileSystemProvider } from './test';
import { EditorLogger } from './test2';
`,
"typescript"
);
var modifiedModel = monaco.editor.createModel(
`import { FileSystemProvider } from './test2';
import { EditorLogger } from './test2';
console.log(112312)
`,
"typescript"
);
const diffEditor = monaco.editor.createDiffEditor(document.getElementById('container'), {
renderSideBySide: true,
automaticLayout: true,
})
diffEditor.setModel({
original: originalModel,
modified: modifiedModel,
});
diffEditor.onDidDispose(() => {
console.log('call dispose')
})
setTimeout(() => {
diffEditor.dispose()
}, 3000)
Reproduction Steps
- create a diffEditor
- add event listeners to dispose event
- dispose the diffEditor
- the event does not be triggered
Actual (Problematic) Behavior
No response
Expected Behavior
should console ths log call dispose
Additional Context
No response
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
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.
More from microsoft/monaco-editor
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
microsoft/monaco-editor#5314 · 2 comments · 4 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
microsoft/monaco-editor#5248 · 8 comments · 57 reactions ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
microsoft/monaco-editor#5193 ·
-
[Bug] colorizeElement method doesn't color the whole text if domNode has more than one #text child Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
microsoft/monaco-editor#4571 ·
-
bug help wanted integration
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
microsoft/monaco-editor#4045 · 8 comments · 11 reactions ·
All issues in microsoft/monaco-editor
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100