microsoft / microsoft/monaco-editor
[Bug] Decorations Not Updating when using an IME to input on windows.
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
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
- Environment: Monaco Playground (line and inline decoration example)
- Input Method: Any IME (e.g., Japanese, Chinese, Korean)
- Monaco Editor Version: [0.52.2]
Reproduction Steps
- Open the line and inline decoration example in playground:.
- Enable an IME.
- Start typing using the IME to input characters on a inline block with decorations.
- 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
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
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
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