microsoft / microsoft/monaco-editor

[Bug] Right-clicking invokes onDidBlurEditorWidget on Windows but not on Mac

Open
#3,525 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug editor-core mac
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 Code
const editor = monaco.editor.create(document.getElementById('container'));

editor.onDidBlurEditorWidget(() => {
    console.log("onDidBlurEditorWidget")
})
Reproduction Steps
  1. Focus and right click on an editor
Actual (Problematic) Behavior

A context menu appears and logs are output on Windows, but not on Mac.

Expected Behavior

It should work the same on Windows and Mac. If we follow the native onBlur, then onDidBlurEditorWidget should not be called.

Additional Context
  • Windows 10: Chrome 109.0.5414.120
  • Mac 12.6: Chrome 109.0.5414.87

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 reproduction and the editor.onDidBlurEditorWidget event shown in the issue. Compare right-click behavior on Windows and macOS, then trace the editor's blur handling to identify why the event differs. Done means the event behavior is consistent across both platforms and the reproduction confirms the expected result.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.