-
Notifications
You must be signed in to change notification settings - Fork 8
Description
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:
- Issue: microsoft/vscode-cosmosdb#2843
- Fix: microsoft/vscode-cosmosdb#2847 - Downgraded Monaco from 0.54.0 to 0.52.2
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
IProductServicewhich 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 tomonaco.jsonmonaco.languages.typescript→ moved tomonaco.typescriptmonaco.languages.css→ moved tomonaco.cssmonaco.languages.html→ moved tomonaco.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:
- Update imports to use
monaco-editorormonaco-editor/esm/vs/editor/editor.main - Update code to use
monaco.json.jsonDefaultsinstead ofmonaco.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:
- Update
package.json:"monaco-editor": "~0.56.0" - Update imports from
editor.apitoeditor.main(if needed) - Update
monaco.languages.json.jsonDefaults→monaco.json.jsonDefaultsin:src/webviews/documentdb/collectionView/components/queryEditor/QueryEditor.tsx
- Test keyboard paste (Ctrl+V / Cmd+V) in all Monaco editors
- Test context menu paste (right-click → Paste)
- Test accessibility features (Tab navigation, Escape to exit)
- Update
src/webviews/REACT_ARCHITECTURE_GUIDELINES.mddocumentation
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
- vscode#283590 - Fix for #5079 (merged Dec 15, 2025)
- vscode-cosmosdb#2847 - Workaround via downgrade
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
Labels
Type
Projects
Status