microsoft / microsoft/monaco-editor

[Bug] IStandaloneCodeEditor.onDidChangeConfiguration does not fire when tabFocusMode is changed

Open
#4,740 1 comment 0 reactions 0 assignees View on GitHub

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?
Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.52.0#XQAAAAKqAQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscwzzSoHfGetpg8d5BCIdogK6CBmgyKHIOVjH6uO-oA-RA-rcpQdGBlgwMT7NDeGjyzFr76MYz0c_YZhkfVact66KR8C292eYPotyrTpNzU4R2pnsg0qMoJFMwW0-anHTtAsGYd8vCeUpVswYFrP72raJqV9anqkd1j9jzqyU9LIcX7Tsw5ZHju14bgnXGT_1jFdi35F53qgwGQlYCxtuQo0E9RLxQwABNyr8p0Pk9P1BV_WsoxPSlyClyFxkPHtujBEuyUl7I-AMd-ICfjOGnF4hktGqtJD2U2lW4tZcb2_1CP5P34uuI9YAXpiZnr-04nkjRaUEVYGWGCySabpG-IJwPL_5BqO9SEQfiX-n7D0A

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
  1. Add handler for onDidChangeConfiguration
  2. In Monaco Editor, click Ctrl + M to change tab focus mode
  3. 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:

https://github.com/microsoft/monaco-editor/issues/1493

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.