monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

Hover widget positioning relative to custom container (override document.body by default)

Open BusinessDuck opened this issue 3 years ago • 0 comments

The problem

Editor may be used in custom container, non document root. As developer i want to customize this one. Take a look at pucture with example. Hover widget are shown below line because iframe (document.body equal) does not have top offset space to show hover popup above line.

image

The solution Use ariaContainerElement or add new property to standalone for override geometry calculation relative to custom container.

UPD: allowEditorOverflow property for widgets looks like the solution, if editor container overflow is set to false the position of hover popup calculated with editor container, buy property allowEditorOverflow does not configurable in default widgets

Related to monaco editor issue https://github.com/microsoft/monaco-editor/issues/302

BusinessDuck avatar Jun 08 '22 15:06 BusinessDuck