From cc29b34b4d6a4f32c61758c3e88511de3d1fba71 Mon Sep 17 00:00:00 2001 From: andron58 Date: Wed, 13 Jan 2021 17:40:27 +0300 Subject: [PATCH] fix: Fix render monaco editor in vuetify dialogs (popups) (#154) Co-authored-by: Andrey --- src/MonacoEditor.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/MonacoEditor.js b/src/MonacoEditor.js index b942bbf..5308716 100644 --- a/src/MonacoEditor.js +++ b/src/MonacoEditor.js @@ -75,14 +75,18 @@ export default { if (this.amdRequire) { this.amdRequire(['vs/editor/editor.main'], () => { this.monaco = window.monaco - this.initMonaco(window.monaco) + this.$nextTick(() => { + this.initMonaco(window.monaco) + }) }) } else { // ESM format so it can't be resolved by commonjs `require` in eslint // eslint-disable-next-line import/no-unresolved const monaco = require('monaco-editor') this.monaco = monaco - this.initMonaco(monaco) + this.$nextTick(() => { + this.initMonaco(monaco) + }) } },