microsoft / microsoft/monaco-editor

[Bug] fixedOverflowWidgets=true makes suggestion widget shows at a wrong location when monaco-editor is hosted inside fluent Callout control #2503

Open
#4,579 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

Reproducible in vscode.dev or in VS Code Desktop?
  • Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.50.0#XQAAAALTAQAAAAAAAABBqQkHQ5NjdTrnpv_fvV9qAMfxMYIuO6niusC9QtfPsm9taNX_wBjCy8oXtXpKXpZv3ve_DlqRToqTT3BB7pyPxes4nAiMzrZgwHbwCbQXh6Jit7uc2B-f1qgoKy5BnNrvTPloPlWVeAqIbhN72cEos8siU_iVjfDIGZVSc6HdfcluTCrnbrOZVd8ydejjYAP2CqsLlVfwHAhqTwq7jyf__42MTxwRkUEpqjOWYxIABe4-zky57CuPlx7tOcZK0MV6MqlqD8U9iAUu7cu-MeUZ0eNk0bHiAG7v5coidrqOZ0RddNNMNFKZZf8Jz9YELzW7BsA5Koc3TNTqNba5dHM05_z1KEcjPNNeBapwbbUcQYB1SzfjmFp7bw-W9hgtBsptylsA64OWgH6ORGGSi72jabF1JBKiqC4D_nGFSHEZ5XCgIGvsC6AG2aA0aJbigK8VvAWkdbvIgP_vjf19

Monaco Editor Playground Code
const value = /* set from `myEditor.getModel()`: */ `function hdsdello() {
	alert('Hello world!');
}
func`;

// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
	value,
	language: "javascript",
	automaticLayout: true,
	fixedOverflowWidgets: true
});
<div style="transform: translate(84px, 165px); height: 100%;">
    <div id="container" style="height: 100%"></div>
</div>
Reproduction Steps

No response

Actual (Problematic) Behavior

Suggestion widget shows at a wrong location (left is correct, top is incorrect) when fixedOverflowWidgets is true.

Old issue https://github.com/microsoft/monaco-editor/issues/2503.

image
Expected Behavior

I expect it to work in the same way as when fixedOverflowWidgets is true

image
Additional Context

No response

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 linked Monaco Editor Playground reproduction and its create call using fixedOverflowWidgets: true, then compare the suggestion widget's position inside the transformed container with the reported screenshots. Trace the overflow-widget positioning path and verify that the widget's top and left coordinates are correct when Monaco is hosted in a Fluent Callout; done means the reproduced placement matches the expected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
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.