-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Open
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
I see the Paste option in context menu. However it doesn't work. The same for ctrl-v or cmd-v.
Tested in application that uses Electron 34.3.3
After I added extra debug to the clipboard.js I see const result = focusedEditor.getContainerDomNode().ownerDocument.execCommand('paste');
returns false.
It is because actually this command doesn't work in Electron and probably import { clipboard } from "electron"; clipboard.readText()
should be used instead.
Unfortunately, if result is false, the alternative code works only if (platform.isWeb)
so not in Electron.
I think newer vscode has this logic fixed but 0.52.2 version stuck with older vscode.
Monaco Editor Playground Code
Reproduction Steps
No response
Actual (Problematic) Behavior
No response
Expected Behavior
No response
Additional Context
No response
shubhamjain, romanolytvyn, donatj, howyoujini and jan-mrm
Metadata
Metadata
Assignees
Labels
No labels