microsoft / microsoft/monaco-editor

[Bug] In Code Editor Monaco, pressing Insert on keyboard does not stop following characters from being moved to the right

Open
#5,229 0 comments 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

No response

Monaco Editor Playground Code
const value = /* set from `myEditor.getModel()`: */ `function hello() {
	alert('Hello world!');
}`;

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

In first line of code in Monaco editor playground, pick a random insertion point,
press Insert key on keyboard,
and type "abc".
Following characters will unexpectedly be moved to the right.

Actual (Problematic) Behavior

Following characters are moved to right.

Expected Behavior

Following characters should not be moved to right.

Additional Context

No response

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 Monaco editor playground and the provided JavaScript reproduction, then trace how the Insert key changes typing behavior. Confirm the issue by placing the caret in the first line, pressing Insert, and typing "abc"; done means the characters following the caret are overwritten rather than moved right.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.