microsoft / microsoft/monaco-editor

[Bug] glyphMarginHoverMessage gets hidden by editor div

Open
#3,136 0 comments 0 reactions 2 assignees View on GitHub

@alexdima is already working on this.

Since Jul 19, 2022.

bug editor-hover help wanted
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 Code
Javascript


var jsCode = [
	'"use strict";',
	'function Person(age) {',
	'	if (age) {',
	'		this.age = age;',
	'	}',
	'}',
    '',
    '',
    '',
    '',
    '',
	'Person.prototype.getAge = function () {',
	'	return this.age;',
	'};'
].join('\n');

var editor = monaco.editor.create(document.getElementById('container'), {
	value: jsCode,
	language: 'javascript',
	glyphMargin: true,
    fixedOverflowWidgets: true
});

var decorations = editor.deltaDecorations(
	[],
	[
		{
			range: new monaco.Range(10, 1, 10, 1),
			options: {
				glyphMarginClassName: 'myGlyphMarginClass',
                glyphMarginHoverMessage: {
                    supportHtml: true,
                    value: "<span>This is <br>a very long <br>hover message. <br>But it is partially <br>visible.</span>"
                }
			}
		}
	]
);


Css:

#container {
    height: 200px;
    border: 1px solid grey;
}

Actual Behavior

glyphMarginHoverMessage is not visible fully when appear near to the bottom edge of editor. The hover message gets hidne by editor div.

Screenshot 2022-06-09 at 4 15 53 PM

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.