microsoft / microsoft/monaco-editor

Add a setting like fixedOverflowWidgets for the context menu

Open
#1,203 10 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

contextmenu feature-request
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.