microsoft / microsoft/monaco-editor
[Bug] Keyboard input cannot be performed normally when certain browser plugins are present
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
Just the default playground can reproduct this issue:
Monaco Editor Playground Code
// It is unrelated to the specific code content.
Reproduction Steps
- The latest version of the Chrome browser
- Install the specific extension - Vimium
- Go to the reproduction link, type 'v' or any other number
- That's it!
Actual (Problematic) Behavior
When I type "v" or some numbers, the browser's Vimium takes over the input behavior, making it impossible to type normally.
When I close this extension and return to Playground, I can type normally.
https://github.com/user-attachments/assets/a25e4f97-c85d-4806-9d63-531ab1c11cfe
Expected Behavior
It should behave similarly to a Textarea or Input element, and should not trigger keyboard events listened to by browser extensions; the two should be completely isolated.
Additional Context
Oddly enough, I found that in a playground of a React secondary wrapper library for the Monaco editor, I could input normally without triggering the Vimium extension.
https://monaco-react.surenatoyan.com/
However, the official playground cannot achieve this.
I'm unsure whether the problem lies in how it's used or in the Monaco Editor's internal logic for handling keyboard events.
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 default Monaco Editor playground linked in the report and reproduce the behavior with Vimium enabled, then compare it with the Monaco React playground. Trace how keyboard events are handled in the playground and determine whether the editor can prevent the extension from taking over without breaking normal input. Done means the reported keys work normally while the extension remains enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100