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

Editors on page stuck at 5px height and width

Open colinblaise opened this issue 5 years ago • 4 comments

Hi, thanks for the great vue component!.

I am trying to render multiple editors on the same page. However, when I load the page, all of the editors show up as a 5px black square. It's as if the editor is not yet finished loading before it is rendered.

If I add a v-if on the editors and toggle the v-if value, then it appears as expected.

Any thoughts as to why this may be happening? Spent awhile debugging it to no avail yet.

colinblaise avatar Jul 11 '19 13:07 colinblaise

set automaticLayout=true

MyCodeGame avatar Dec 09 '19 09:12 MyCodeGame

I found even using automaticLayout=true doesn't solve this problem well. So I ended up writing a setInterval to fix it. It detects any resizing and then update the height of monaco editor, and clear the interval after 3 seconds. It might not be a decent solution but works well for me

yf-hk avatar Feb 02 '20 03:02 yf-hk

Yes, this is driving me crazy, it's very hard to resolve for some reason and creeps back up just when I think it's solved. This really needs to be addressed, it should just take up all the available space automatically.

WhatFreshHellIsThis avatar Aug 28 '20 00:08 WhatFreshHellIsThis

Hello, so the issue comes from version 1.1.0 to 1.2.0. As a workaround till this is fixed revert to 1.1.0.

balhelhas avatar Nov 11 '20 16:11 balhelhas