microsoft / microsoft/monaco-editor

[Bug] Monaco editor on firefox ignores first input after highlighting word via keyboard

Open
#5,281 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.55.1#example-creating-the-editor-hello-world

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
  1. Open link in Firefox Developer Edition
  2. Highlight a word with Ctrl-Shift-Left
  3. Type anything - It will ignore the first keystroke.
Actual (Problematic) Behavior

Skipping first keystroke.

Expected Behavior

Not skipping any keystroke

Additional Context

https://github.com/user-attachments/assets/3c93f79d-7aca-4305-b0bf-ea775683c2b4

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 provided Monaco Editor Playground link and reproduce the Ctrl-Shift-Left selection followed by typing in Firefox Developer Edition. Trace the editor's keyboard-input handling from that reproduction; done means the first typed character is inserted after highlighting a word, without changing the behavior in the stated comparison environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
57/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.