Skip to content

Upgrade Monaco Editor to 0.56.0 when released #469

@tnaum-ms

Description

@tnaum-ms

Summary

We've temporarily downgraded Monaco Editor from ~0.54.0 to ~0.52.2 to fix a keyboard paste regression. This issue tracks upgrading to Monaco 0.56.0 once it's released, as it should contain fixes for multiple clipboard-related bugs.

Current Status

  • Installed version: ~0.52.2 (downgraded)
  • Previous version: ~0.54.0 (broken keyboard paste)
  • Target version: ~0.56.0 (once stable)

Why We Downgraded

Users reported that Ctrl+V / Cmd+V keyboard paste stopped working in all Monaco editors (Query Editor, Document View, etc.), while:

  • Copy (Ctrl+C) still worked
  • Context menu paste (right-click → Paste) still worked

This exact symptom was also reported and fixed in vscode-cosmosdb:

The root cause of the keyboard paste regression in 0.53.x/0.54.x hasn't been publicly identified in a specific Monaco issue, but the empirical fix (downgrading to 0.52.x) resolved the problem in both vscode-cosmosdb and our extension.

Why We're Targeting 0.56.0

Monaco 0.55.x has additional issues that make it unsuitable:

1. Context Menu Paste Bug (Fixed in 0.56.0-dev)

Issue: microsoft/monaco-editor#5079 - "Paste not working with right click"

In Monaco 0.54.0+, the context menu "Paste" action fails silently. The root cause was identified:

The PasteAction implementation attempts to retrieve IProductService which is not registered in the Monaco Editor Standalone environment. This causes an "Unknown service" error that halts execution before the actual paste logic runs.

Fix: microsoft/vscode#283590 - Merged December 15, 2025

This fix IS included in 0.56.0-dev builds (builds after Dec 15, 2025)

2. Breaking API Changes in 0.55.0

Monaco 0.55.0 introduced breaking changes that affect our codebase:

  • monaco.languages.json → moved to monaco.json
  • monaco.languages.typescript → moved to monaco.typescript
  • monaco.languages.css → moved to monaco.css
  • monaco.languages.html → moved to monaco.html

Our code uses monaco.languages.json.jsonDefaults.setDiagnosticsOptions() which no longer works in 0.55.x when importing from monaco-editor/esm/vs/editor/editor.api.

Note: When upgrading to 0.56.0, we'll need to:

  1. Update imports to use monaco-editor or monaco-editor/esm/vs/editor/editor.main
  2. Update code to use monaco.json.jsonDefaults instead of monaco.languages.json.jsonDefaults

Timeline of Monaco Clipboard Issues

Version Keyboard Paste Context Menu Paste Notes
0.52.x ✅ Works ✅ Works Our current version
0.53.x ❌ Regression ✅ Works Unknown root cause
0.54.x ❌ Regression ✅ Works Same as 0.53.x
0.55.x ❌ Regression ❌ Bug #5079 Both broken
0.56.0 ❓ Needs testing ✅ Fixed #5079 fix merged

Action Items for 0.56.0 Upgrade

When Monaco 0.56.0 stable is released:

  1. Update package.json: "monaco-editor": "~0.56.0"
  2. Update imports from editor.api to editor.main (if needed)
  3. Update monaco.languages.json.jsonDefaultsmonaco.json.jsonDefaults in:
    • src/webviews/documentdb/collectionView/components/queryEditor/QueryEditor.tsx
  4. Test keyboard paste (Ctrl+V / Cmd+V) in all Monaco editors
  5. Test context menu paste (right-click → Paste)
  6. Test accessibility features (Tab navigation, Escape to exit)
  7. Update src/webviews/REACT_ARCHITECTURE_GUIDELINES.md documentation

Related Links

Our Investigation

  • This tracking issue

Monaco Issues

  • #5079 - Context menu paste bug (fixed Dec 2025)
  • #4402 - Platform detection bug (fixed in 0.48.0)
  • #4855 - Electron 34 paste issue (open)

Fixes

Resources

Dev Versions for Early Testing

If you want to test before 0.56.0 stable:

npm install [email protected]

Note: Dev versions are not recommended for production.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions