microsoft / microsoft/monaco-editor

[Bug] Keyboard input cannot be performed normally when certain browser plugins are present

Open
#5,168 1 comment 1 reaction 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

Just the default playground can reproduct this issue:

https://microsoft.github.io/monaco-editor/playground.html?source=v0.55.1#example-creating-the-editor-hello-world

Monaco Editor Playground Code
// It is unrelated to the specific code content.
Reproduction Steps
  1. The latest version of the Chrome browser
  2. Install the specific extension - Vimium
Image
  1. Go to the reproduction link, type 'v' or any other number
  2. 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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.