Open Wissperwind opened 8 months ago
just bumped into the same issue.
I see the height is being calculated in pixels when it grows but not when it shrinks. I guess I'm also curious to understand why the editor is using a static unit instead of height: 100%
in these cases
Do you think it's related to the React wrapper or the original monaco-editor library? Maybe you can check your case in the monaco playground
Hi @suren-atoyan, I've just tested my usecase in the monaco playground and the height seems to be correctly adapting when shrinking the window. For context, I'm looking at the height
inlined property of the <div class="monaco-editor"/>
container
If the issue is in the wrapper we should be able to fix it by changing the styles of this element. This is the only extra element react-monaco is adding to the monaco.
Hi,
I use the editor with 100% height and 100% width. So it fills the parent object. If I enlarge and shrink the browser window by mouse dragging horizontally, the editor perfectly adjusts its size. It grows and it shrinks. But that is not the case if I adjust the height. It grows, if I enlarge the browser window. But it does not get smaller in hight if I make the browser window smaller in height. Instead a scrollbar at the parent object appears.