Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a setting like fixedOverflowWidgets for the context menu #1203

Open
spahnke opened this issue Nov 19, 2018 · 10 comments
Open

Add a setting like fixedOverflowWidgets for the context menu #1203

spahnke opened this issue Nov 19, 2018 · 10 comments
Labels
contextmenu feature-request Request for new features or functionality
Milestone

Comments

@spahnke
Copy link
Contributor

spahnke commented Nov 19, 2018

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!

@alexdima
Copy link
Member

@spahnke Not sure I fully understand the problem. Here is what I get (which looks kind of OK):

image

@alexdima alexdima added the info-needed Issue requires more information from poster label Nov 20, 2018
@spahnke
Copy link
Contributor Author

spahnke commented Nov 20, 2018

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

@alexdima
Copy link
Member

Might be related to #1199. But @spahnke AFAIK the flag fixedOverflowWidgets was never influencing the context menu (in any editor version).

@spahnke
Copy link
Contributor Author

spahnke commented Nov 20, 2018

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! 😥

@joaomoreno
Copy link
Member

Hm... we probabaly need an option in the editor in order not to let the context menu overflow the editor space.

@joaomoreno joaomoreno added feature-request Request for new features or functionality and removed info-needed Issue requires more information from poster labels Nov 22, 2018
@joaomoreno joaomoreno added this to the Backlog milestone Nov 22, 2018
@spahnke
Copy link
Contributor Author

spahnke commented Nov 22, 2018

That would be ideal.

@spahnke spahnke changed the title Setting fixedOverflowWidgets does not seem to work anymore Add a setting like fixedOverflowWidgets for the context menu Nov 22, 2018
@joaomoreno joaomoreno removed their assignment Oct 10, 2019
@alexdima alexdima modified the milestones: Backlog, Backlog Candidates Dec 10, 2019
@izikl
Copy link

izikl commented Jul 20, 2021

@alexdima was there any progress on this issue?

@Weffe
Copy link

Weffe commented May 19, 2022

@alexdima Just pinging to see if this backlog item could be addressed some time in the near future.

@lidermanrony
Copy link

ping on this

@jardenliu
Copy link

pined

jboix added a commit to SRGSSR/pillarbox-web-theme-editor that referenced this issue Mar 28, 2024
Resolves an issue where widgets and context menus were being cut off when they extended outside the
Editor's container by enabling fixedOverflowWidgets.

Refs: microsoft/monaco-editor#1203
github-merge-queue bot pushed a commit to SRGSSR/pillarbox-web-theme-editor that referenced this issue Mar 28, 2024
Resolves an issue where widgets and context menus were being cut off when they extended outside the
Editor's container by enabling fixedOverflowWidgets.

Refs: microsoft/monaco-editor#1203
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contextmenu feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

8 participants