microsoft / microsoft/monaco-editor
[Bug] IStandaloneCodeEditor.onDidChangeConfiguration does not fire when tabFocusMode is changed
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
Monaco Editor Playground Code
const value = /* set from `myEditor.getModel()`: */ `function hello() {
alert('Hello world!');
}`;
// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
value,
language: "javascript",
automaticLayout: true,
});
myEditor.onDidChangeConfiguration((e) => {
alert("Config changed!")
});
Reproduction Steps
- Add handler for
onDidChangeConfiguration - In Monaco Editor, click Ctrl + M to change tab focus mode
- Observe that an event is not raised for
onDidChangeConfiguration, but the tab focus mode is changed in the editor
Actual (Problematic) Behavior
The handler for onDidChangeConfiguration is not called.
Expected Behavior
The handler for onDidChangeConfiguration should be called
Additional Context
This issue seems to have originated from 0.36.0. May be related to this bug:
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 with the Monaco Editor Playground reproduction and the IStandaloneCodeEditor.onDidChangeConfiguration entry point. Trace how changing tabFocusMode through Ctrl+M updates the editor configuration, then verify that the configuration-change handler fires for that change. Done means the reported playground scenario raises the event without breaking other configuration changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100