Skip to content

Fix configuration events when toggling tab focus mode - #345251

Merged
Megan Rogge (meganrogge) merged 3 commits into
microsoft:mainfrom
amv146:fix/monaco-tab-focus-configuration
Nov 17, 2026
Merged

Megan Rogge (meganrogge) merged 3 commits into
microsoft:mainfrom
amv146:fix/monaco-tab-focus-configuration

Conversation

@amv146

@amv146 Alex Vallone (amv146) commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes microsoft/monaco-editor#4740.

Summary

Toggling tab focus mode with Ctrl+M changes keyboard navigation, but the computed tabFocusMode option ignores the global state. Configuration recomputation therefore detects no change and suppresses onDidChangeConfiguration.

Compute the option from the existing effective environmental value instead. This preserves global/per-editor precedence and lets the normal change-detection path emit the event, without changing shortcut handling or forcing notifications.

Add two regression tests covering initial state, multiple editors, global toggles, explicit per-editor options, and suppression of unchanged effective values.

Validation

Validated at PR head 75b9839748008172ad8ba3f09a6bb3cbc8627f83, including full standalone Monaco distribution E2E testing on Windows in Chromium and Firefox.

  • npm run test-browser-no-install -- --browser chromium --run src\vs\editor\test\browser\config\editorConfiguration.test.ts --run src\vs\editor\test\browser\widget\codeEditorWidget.test.ts --reporter dot — 50 passing. Both new regression tests fail without the fix.
  • npm run eslint -- src\vs\editor\common\config\editorOptions.ts src\vs\editor\test\browser\config\editorConfiguration.test.ts — passed.
  • npm run monaco-compile-check — passed.
  • npm run gulp editor-distro — passed, including source extraction/tree shaking, TypeScript compilation with zero errors, NLS processing, and package resources.
  • npm --prefix test\monaco run bundle-webpack — passed.
  • npm --prefix test\monaco run compile — passed.
  • npm --prefix test\monaco test — 18 passing: the complete existing API/accessibility suite, nine tests each in Chromium and Firefox.

The issue-specific E2E uses the generated distribution with two real standalone editors. Trusted browser Ctrl+M, Tab, and Shift+Tab input verifies actual focus movement, indentation/unindentation, computed options, and public onDidChangeConfiguration events. It covers both browsers with default and forced-textarea input; Chromium's default uses EditContext.

The identical fix-expecting assertions were run against a separately extracted and compiled distribution from the actual pre-change upstream parent, 1a56f139eab380ba5922e787ccee745654202d1c, and against the fixed distribution:

  • node .build\monaco-4740-browser\harness.mjs test --distribution --prechange-distribution --variant=baseline — 0 passing, 4 failing; exit 1. Every case fails specifically because the required configuration events are absent after Ctrl+M changes Tab navigation, not because of browser/setup errors.
  • node .build\monaco-4740-browser\harness.mjs test --distribution --prechange-distribution --variant=fixed — 4 passing, 0 failing; exit 0.

The two new unit regressions likewise fail before the change and pass afterward. The existing 18 API/accessibility tests are compatibility checks, not regression tests expected to fail before this fix. The issue-specific harness, traces, and recordings are local validation artifacts and are not included in this PR.

This validates standalone Monaco's distribution end to end, not the full VS Code Electron workbench. Full Electron/application validation remains blocked by local environment issues: a missing Windows SDK and unrelated dependency resolution through a parent Yarn PnP manifest.

Co-authored-by: Copilot [email protected]

Copilot AI balanced review requested due to automatic review settings October 30, 2026 19:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The tab focus mode notification fix has no active review issues.

No open issues 🎉

What changed in this PR

Fixes configuration change notifications when toggling tab focus mode by making the computed editor option reflect the effective environmental value.

Changes:

  • Computes tabFocusMode from the existing effective state, preserving global and per-editor precedence.
  • Adds two regression tests covering initial values, multiple editors, global toggles, option updates, and suppression of unchanged effective values.
File Description
src/​vs/​editor/​test/​browser/​config/​editorConfiguration.test.ts Adds regression coverage for tab focus mode values and change events.
src/​vs/​editor/​common/​config/​editorOptions.ts Adds a dedicated option computation that uses the effective tab focus mode.

Review effort: Balanced

@meganrogge
Megan Rogge (meganrogge) added this pull request to the merge queue Nov 17, 2026
Merged via the queue into microsoft:main with commit 1a44ceb Nov 17, 2026
59 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.148.0 milestone Nov 17, 2026
Parth Raiyani (rparth07) pushed a commit to rparth07/vscode that referenced this pull request Nov 19, 2026
…49316)

Use the effective tabFocusMode option after microsoft#345251 instead of allowing the global listener to overwrite per-editor overrides. Cover global toggles, repeated notifications, and option updates.

Co-authored-by: Copilot <[email protected]>
Matt Van Horn (mvanhorn) pushed a commit to mvanhorn/camunda that referenced this pull request Nov 26, 2026
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [monaco-editor](https://redirect.github.com/microsoft/monaco-editor) |
[`0.55.1` →
`0.58.0`](https://renovatebot.com/diffs/npm/monaco-editor/0.55.1/0.58.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/monaco-editor/0.58.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/monaco-editor/0.55.1/0.58.0?slim=true)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](..camunda/issues/12605) for more information.

---

### Release Notes

<details>
<summary>microsoft/monaco-editor (monaco-editor)</summary>

###
[`v0.58.0`](https://redirect.github.com/microsoft/monaco-editor/blob/HEAD/CHANGELOG.md#0580)

[Compare
Source](https://redirect.github.com/microsoft/monaco-editor/compare/v0.57.0...v0.58.0)

##### Breaking Changes

- Markdown rendered by the editor (hovers, suggestion details, parameter
hints, inline completion warnings, editor messages) no longer loads
remote images by default. `data:` images are still shown. Use the new
`markdownImages.allowedOrigins` editor option to allow images from
specific origins (for example `['https://img.shields.io']`), or set it
to `true` to allow all remote images as before.

##### Fixes

- Fires configuration change events when tab focus mode is toggled, and
keeps per-editor `tabFocusMode` overrides
([#&camunda#8203;4740](https://redirect.github.com/microsoft/monaco-editor/issues/4740),
[microsoft/vscode#345251](https://redirect.github.com/microsoft/vscode/pull/345251),
[microsoft/vscode#349316](https://redirect.github.com/microsoft/vscode/pull/349316)).
- Bundles the `@vscode/diff` backend in the editor worker, so the
`advanced-external` diff algorithm works in bundled applications
(`advanced-wasm` uses the same TypeScript backend in the standalone
editor), and falls back to the built-in diff when it fails
([microsoft/vscode#348527](https://redirect.github.com/microsoft/vscode/pull/348527),
[microsoft/vscode#346266](https://redirect.github.com/microsoft/vscode/pull/346266)).
- Fixes memory leaks in the word highlighter and color picker, and
reduces idle CPU usage by disabling the native caret blink in
EditContext.
- Fixes `findWithArgs` ignoring empty search strings, UTF-16 column
counts in text lengths, stale format-on-type requests, and auto-closed
pair tracking for suggestion edits.
- Fixes several minimap rendering issues (slider behavior with view
zones, section headers, background, sizing on high-DPI screens).

##### Updates

- Updates the editor core to VS Code commit
`c132f72ae9f5ff80093e7d722c36f03755865b20`, validated in `0.58.0-rc.2`.
- Adds `@vscode/diff` 0.0.2-145 as a dependency.
- Updates bundled DOMPurify from 3.4.15 to 3.4.17.

###
[`v0.57.0`](https://redirect.github.com/microsoft/monaco-editor/blob/HEAD/CHANGELOG.md#0570)

[Compare
Source](https://redirect.github.com/microsoft/monaco-editor/compare/v0.56.0...v0.57.0)

##### New Features and APIs

- Adds `editor.wordWrapIndicator` to display an indicator at the
wrapping column of soft-wrapped lines.
- Adds `editor.fullwidthCharacterWidth`, with `font` and `twoCells`
modes for rendering full-width characters.
- Adds `languages.score` to score a language selector against a URI and
language.
- Exports the `editor.DiffEditorViewMode` type.
- Adds `isForAnotherDocument` to the inline completion
`languages.LifetimeSummary` type.

##### Updates

- Updates the editor core to VS Code commit
`6a598d4a13031703d483d103c1d934a36ad27971`, validated in `0.57.0-rc.2`.
- Updates bundled DOMPurify from 3.4.8 to 3.4.15.

###
[`v0.56.0`](https://redirect.github.com/microsoft/monaco-editor/blob/HEAD/CHANGELOG.md#0560)

[Compare
Source](https://redirect.github.com/microsoft/monaco-editor/compare/v0.55.1...v0.56.0)

##### Breaking Changes

- Reorganizes the exported ESM modules to provide supported,
tree-shakeable entry points
([#&camunda#8203;5155](https://redirect.github.com/microsoft/monaco-editor/pull/5155)).
The `monaco-editor` entry point continues to load all features and
languages. Custom bundles can now import `monaco-editor/editor` and opt
into:
- all editor features with `monaco-editor/features/register.all`, or
individual features with `monaco-editor/features/<feature>/register`;
- all language definitions with
`monaco-editor/languages/definitions/register.all`, or individual
definitions with
`monaco-editor/languages/definitions/<language>/register`;
- the CSS, HTML, JSON, and TypeScript language features with
`monaco-editor/languages/features/register.all`, or their individual
`register` entry points.
- Renames the misspelled `IOverlayWidgetPosition.stackOridinal` property
to `stackOrdinal`.
- Removes the deprecated `IMirrorModel` and `IWorkerContext` worker API
types.

##### New Features and APIs

- Adds `editor.doubleClickSelectsBlock`.
- Adds `editor.find.closeOnResult` and
`editor.inlayHints.showLongLineWarning`.
- Adds `offWhenInlineCompletions` to `QuickSuggestionsValue`.
- Adds model and provider option support to inline completion providers.
- Adds `ICodeEditor.revealAllCursors`, `ICodeEditor.getWidthOfLine`, and
`ICodeEditor.renderAsync`.
- Adds `advanced-external` and `advanced-wasm` diff algorithms.
- Exposes typed native LSP client and transport APIs.

##### Fixes

- Treats Markdown returned by language servers as untrusted
([#&camunda#8203;5280](https://redirect.github.com/microsoft/monaco-editor/pull/5280)).
- Updates the editor core to the version used by `0.56.0-dev-20260625`.

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
- At 08:00 PM through 11:59 PM and 12:00 AM through 08:59 AM, Monday
through Friday (`* 20-23,0-8 * * 1-5`)
  - Only on Sunday and Saturday (`* * * * 0,6`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/camunda/camunda).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNjIuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjI2Mi4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhcmVhL2Zyb250ZW5kIiwiYXV0b21lcmdlIiwiZGVwZW5kZW5jaWVzIl19-->
renovate Bot added a commit to Arbeidstilsynet/brevgen2 that referenced this pull request Nov 27, 2026
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [monaco-editor](https://redirect.github.com/microsoft/monaco-editor) |
[`0.57.0` →
`0.58.0`](https://renovatebot.com/diffs/npm/monaco-editor/0.57.0/0.58.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/monaco-editor/0.58.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/monaco-editor/0.57.0/0.58.0?slim=true)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/24) for more information.

---

### Release Notes

<details>
<summary>microsoft/monaco-editor (monaco-editor)</summary>

###
[`v0.58.0`](https://redirect.github.com/microsoft/monaco-editor/blob/HEAD/CHANGELOG.md#0580)

[Compare
Source](https://redirect.github.com/microsoft/monaco-editor/compare/v0.57.0...v0.58.0)

##### Breaking Changes

- Markdown rendered by the editor (hovers, suggestion details, parameter
hints, inline completion warnings, editor messages) no longer loads
remote images by default. `data:` images are still shown. Use the new
`markdownImages.allowedOrigins` editor option to allow images from
specific origins (for example `['https://img.shields.io']`), or set it
to `true` to allow all remote images as before.

##### Fixes

- Fires configuration change events when tab focus mode is toggled, and
keeps per-editor `tabFocusMode` overrides
([#&#8203;4740](https://redirect.github.com/microsoft/monaco-editor/issues/4740),
[microsoft/vscode#345251](https://redirect.github.com/microsoft/vscode/pull/345251),
[microsoft/vscode#349316](https://redirect.github.com/microsoft/vscode/pull/349316)).
- Bundles the `@vscode/diff` backend in the editor worker, so the
`advanced-external` diff algorithm works in bundled applications
(`advanced-wasm` uses the same TypeScript backend in the standalone
editor), and falls back to the built-in diff when it fails
([microsoft/vscode#348527](https://redirect.github.com/microsoft/vscode/pull/348527),
[microsoft/vscode#346266](https://redirect.github.com/microsoft/vscode/pull/346266)).
- Fixes memory leaks in the word highlighter and color picker, and
reduces idle CPU usage by disabling the native caret blink in
EditContext.
- Fixes `findWithArgs` ignoring empty search strings, UTF-16 column
counts in text lengths, stale format-on-type requests, and auto-closed
pair tracking for suggestion edits.
- Fixes several minimap rendering issues (slider behavior with view
zones, section headers, background, sizing on high-DPI screens).

##### Updates

- Updates the editor core to VS Code commit
`c132f72ae9f5ff80093e7d722c36f03755865b20`, validated in `0.58.0-rc.2`.
- Adds `@vscode/diff` 0.0.2-145 as a dependency.
- Updates bundled DOMPurify from 3.4.15 to 3.4.17.

</details>

---

### Configuration

📅 **Schedule**: (in timezone Europe/Oslo)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/Arbeidstilsynet/brevgen2).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNjIuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjI2Mi4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

5 participants