microsoft / microsoft/monaco-editor
Add a setting like fixedOverflowWidgets for the context menu
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
monaco-editor version: 0.15.5
Browser: any
OS: Windows 10
Edited: There was no bug in the first place, so this is rather a feature request.
Hi,
we embed the editor in a div which has overflow: hidden set which I can't change easily (it's a custom element coming from our framework). If you set fixedOverflowWidgets: true widgets like the suggestion list are able to overflow the editor space such that they are shown to their full extent. However, this does not affect the context menu. It would be great to have a similar option for it.
Playground example:
Open a context menu at the border of the marked div.
monaco.editor.create(document.getElementById("container"), {
value: "function hello() {\n\talert('Hello world!');\n}",
language: "javascript",
fixedOverflowWidgets: true
});
<div style="height: 300px; overflow: hidden; border: 1px solid red;">
<div id="container" style="height:100%;"></div>
</div>
Thanks!
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
Start with the fixedOverflowWidgets setting and the context-menu entry point, then reproduce the issue using the provided Playground example with the marked div and overflow:hidden. Trace how the suggestion list escapes the editor boundary and make the context menu behave similarly; done means it is fully visible at the boundary in that example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100