Add a setting like fixedOverflowWidgets for the context menu
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!
@spahnke Not sure I fully understand the problem. Here is what I get (which looks kind of OK):

Ah, that looks right, but it is broken for the context menu. I will edit the issue text.

Might be related to #1199. But @spahnke AFAIK the flag fixedOverflowWidgets was never influencing the context menu (in any editor version).
You are right, the flag didn't affect the context menu at all. I don't where I was looking... Is there anything else I could do about that?
I'm so sorry for the noise! 😥
Hm... we probabaly need an option in the editor in order not to let the context menu overflow the editor space.
That would be ideal.
@alexdima was there any progress on this issue?
@alexdima Just pinging to see if this backlog item could be addressed some time in the near future.
ping on this
pined