[Bug] Word-wrapping turns text invisible when size-constrained
Describe the bug The editor completely hides a "word-wrapped" line when the line is sufficiently long.
To Reproduce
- Create new React 19 project:
pnpm create vite@latest - Add @monaco-editor/react dependency:
pnpm add @monaco-editor/react - Initialize monaco
<Editor />with wordWrap enabled in a height/width constrained div. Se playground / example code.
I have created reproducible GitHub and StackBlitz projects, showing the issue:
Expected behavior I expect the word-wrapping to keep showing the line while scrolling.
Screenshots
Desktop (please complete the following information):
- OS: Linux, Fedora 42
- Browser: Tested on Firefox & Chromium
- Version 4.7.0
Additional context I have also created an issue under the monaco project: https://github.com/microsoft/monaco-editor/issues/5005
After further research, it seems like the issue has been fixed in Monaco 0.53.0. Monac react uses Monaco 0.52.2, which reproduces the issue in the monaco editor playground. As far as I can see the issue was introduced in 0.52.0 and did not exist in 0.51.0:
The reason I was having this issue is because @monaco-editor/[email protected] (latest) uses @monaco-editor/[email protected] (latest) uses [email protected] (old release).