microsoft / microsoft/monaco-editor

[Bug] Decorations Not Updating when using an IME to input on windows.

Open
#4,805 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?

When using an Input Method Editor (IME) on Windows, decorations in the Monaco editor do not update correctly after the compositionStart event is fired. This issue occurs when a user starts typing using an IME, and the editor fails to refresh or re-render the decorations, leading to incorrect or missing visual cues.

To Reproduce
  1. Environment: Monaco Playground (line and inline decoration example)
  2. Input Method: Any IME (e.g., Japanese, Chinese, Korean)
  3. Monaco Editor Version: [0.52.2]
Reproduction Steps
  1. Open the line and inline decoration example in playground:.
  2. Enable an IME.
  3. Start typing using the IME to input characters on a inline block with decorations.
  4. Observe that the decorations in the line of typing are not updated or re-rendered to reflect the changes in the text.
Expected Behavior

Decorations should update dynamically as the user types using the IME, even during the composition phase (between compositionStart and compositionEnd events).

Actual (Problematic) Behavior

Decorations do not update after the compositionStart event, leading to inconsistencies between the displayed text and the visual decorations.

Screenshots

Image

Additional context

This issue specifically occurs on Windows when using an IME.
It may be related to the way the Monaco editor handles input events and updates decorations during IME composition.
This bug can impact various features that rely on decorations, such as syntax highlighting, error markers, and custom annotations.
Possible solution.

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

Reproduce the issue using the Monaco Playground line and inline decoration example at version 0.52.2 on Windows with an IME, focusing on the period after compositionStart. Trace the input and decoration update paths, then verify that decorations refresh during composition without regressing normal typing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.