Monaco Editor 0.58.0: context menu has no background when fixedOverflowWidgets is true
Comments · 0
Be the first to comment.
Bug reportby SceneRecap AI
Repro steps
- 1.Load a page with two Monaco 0.58.0 editors holding identical code. The left editor uses fixedOverflowWidgets: true. The right editor uses fixedOverflowWidgets: false (default).
- 2.Control: left-click in the right editor (fixedOverflowWidgets false).
- 3.Control: right-click at the same spot in the right editor to open the context menu.
- 4.Control: press Escape to close the menu.
- 5.Left-click at the end of line 6 in the left editor (fixedOverflowWidgets true).
- 6.Right-click at the same spot in the left editor to open the context menu.
- 7.Observe the menu, then press Escape to close it.
Expected
With fixedOverflowWidgets true, the context menu should render like the default case. It should have a white background, a border or shadow, and readable items, including where it overflows past the editor bounds.
Actual
With fixedOverflowWidgets true, the context menu items render as bare text with no background, border or shadow. Items that overflow below the editor (Cut, Copy, Command Palette) sit directly on the page background. The menu is visually transparent and hard to read.
Evidence
Issue markdown (copy-paste ready)
## Summary In Monaco Editor 0.58.0, the editor context menu renders with no background, border or shadow when the editor is created with `fixedOverflowWidgets: true`. With the default (`false`) the menu renders normally. ## Environment - Monaco Editor 0.58.0 (cdn.jsdelivr.net, min/vs/loader.js) - Chromium 151.0.7922.34, macOS - Viewport 1280x720, DPR 1 ## Steps to reproduce 1. Create two editors with identical code. Left: `fixedOverflowWidgets: true`. Right: `fixedOverflowWidgets: false` (default). (1s) 2. Control: left-click, then right-click in the right editor. (9.1s, 10.1s) 3. Press Escape. (15.6s) 4. Left-click at the end of line 6 in the left editor, then right-click there. (18.8s, 19.6s) 5. Observe the context menu, then press Escape. (26.5s) ## Expected The context menu has a solid background, border or shadow, and readable items, the same as the default case. This includes the part that overflows past the editor bounds. ## Actual The menu items (Go to Definition ... Command Palette) render as bare text with no background, border or shadow. Items that overflow below the editor sit directly on the page background. ## Evidence - 11s: Control (fixedOverflowWidgets false). The menu has a white background and shadow and is readable past the editor bottom. - 13s / 15s: Control. Hover highlights work on Go to Definition and Go to Symbol... - 21s: Failing case (fixedOverflowWidgets true). The menu has no background and overlays editor text. - 23s: Cut, Copy and Command Palette render on the page background below the editor. - 0s: Console warning about loader.js invoked via document.write. Likely unrelated. ## Suspected area Context menu styling in the fixed overflow widgets container. The menu is probably mounted outside the `.monaco-editor` element, so theme variables or menu background CSS are not applied. *Recorded with SceneRecap.*
This report was written by SceneRecap from a screen recording. Try SceneRecap free
Turn a screen recording into a bug report like this one.
Repro steps, expected vs actual and the console and network evidence, each with a timestamp. On every plan, Free included.
Try SceneRecap free →