[Bug] Suggestion box has the wrong height when the available space is limited
See original GitHub issueReproducible 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
Monaco Editor Playground Code
The code doesn't matter, the window size does.
I made a 1 minute Loom video about reproducing the bug several times in the Monaco Editor Playground:
https://www.loom.com/share/44c73f0233004e508c3d35a62da429d8
Actual Behavior
The suggestion box becomes very little—in many cases just one line high!
Expected Behavior
The suggestion box should reasonably fill the available space.
Additional Context
In VS Code, the bug is technically there (here is a 2-min video about it), but its impact is way smaller: it’s a very narrow edge case and not likely to ever cause real trouble for users, so I don’t think it’d ever get attention from the VS Code team. But for other uses of this open-source component, it’s a real bug (as I demoed it in the playground), so I think this bug report belongs in this project.
Why this hurts me: I’m a developer at Sourcegraph, and I’m building a plugin for JetBrains product where I use the Monaco Editor for our search box. The space there is pretty limited, so the suggestion box often becomes just a single line.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
+1 — we also desire to integrate Monaco using an Iframe and encountered the same issue. At first glance I’m thinking it would be nice to be able to provide an explicit parent element for the suggestion menu.
Also, If the window is small and I have only 3 lines, (but could fit 6 in the space) I get only 1 suggestion. If I add a few line breaks to get 6 empty lines in the editor, I get 3 suggestions