microsoft / microsoft/monaco-editor
[Bug] Monaco editor on firefox ignores first input after highlighting word via keyboard
Open
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?
- Not reproducible in the monaco editor playground
Monaco Editor Playground Link
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
- Open link in Firefox Developer Edition
- Highlight a word with Ctrl-Shift-Left
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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