microsoft / microsoft/monaco-editor

[Bug] Paste in editor context menu broken on monaco-editor 0.47

Open
#4,438 1 comment 4 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://stackblitz.com/edit/github-f3sm97?file=src%2Findex.js

Monaco Editor Playground Code
need webpack, so I share it on stackblitz
Reproduction Steps
  1. enable webpack process polyfill
  2. build and open monaco-editor
  3. right click the editor menu and click paste, it paste nothing
Actual (Problematic) Behavior

right click the editor menu and click paste, it paste nothing

Expected Behavior

right click the editor menu and click paste, it paste code

Additional Context

this is because: https://github.com/microsoft/vscode/pull/200935

this pr will make platform.isWeb to false

image

so it cannot enter the right logic

CleanShot 2024-03-20 at 17 15 26@2x

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 StackBlitz reproduction at src/index.js and review how the webpack process polyfill affects the editor's platform.isWeb logic, alongside the linked VS Code pull request. Reproduce the context-menu paste failure in the provided setup; done means paste inserts code when selected from the editor context menu.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, webpack
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.