microsoft / microsoft/monaco-editor

[Bug] $0 with drag in drop

Open
#4,872 1 comment 0 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://microsoft.github.io/monaco-editor/playground.html?source=v0.52.2#XQAAAAKDAQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscwzlSNRgmSaumWUF-TBOsVJ4S4FwfCDQb5-2uUHXTVAefbVSd9IzaZ_vv9VR9KugsKimARHSWlrTPOQHROITHxmAeFEs9_m3VHdSe7_Etv6WpgzlH44tD3yNpisXTdgJwsBn4J8wCQzQJEZwUEOV-ZfSHePvgHG4dIQyj-jU9f95vy8r7D5b12Mkb_66VSBWeBRtBBfiYf0JW8U58K-AVJ4aF57SR-Lb8hVhB5tMeIwDlzN7I04ulpvD0f-cSTFedVPyaLvReV93_Cz-JcDNpB28eOpCLGnY5iFlW5H_RARNFIfT_HkyWrLVovfrJUi3spJO1U_2wcav83BUsA

Monaco Editor Playground Code
const value = /* set from `myEditor.getModel()`: */ `function hello() {
	alert('Hello world!');
}update package to 4.7.0 version\$0`;

// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
	value,
	language: "javascript",
	// automaticLayout: true,
});
Reproduction Steps

Select a text of other page\browser\component and drop in the editor

Actual (Problematic) Behavior

every i drag and drop in the final of word appear "$0" word

Expected Behavior

when i drop not show the word "$0"

Additional Context

https://github.com/user-attachments/assets/d0067c47-a84a-40b2-8bf6-53adc6b09de2

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 linked Monaco Editor Playground reproduction and the provided TypeScript snippet, then reproduce the drag-and-drop behavior described in the issue. Done means dropping selected text into the editor no longer inserts an unexpected "$0" at the end of the word.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.