diff --git a/client/js/components/editor-codeblock.js b/client/js/components/editor-codeblock.js index 8382b3a4..e1a904cb 100644 --- a/client/js/components/editor-codeblock.js +++ b/client/js/components/editor-codeblock.js @@ -50,6 +50,7 @@ module.exports = (mde, mdeModalOpenState) => { }, methods: { open: (ev) => { + mdeModalOpenState = true; $('#modal-editor-codeblock').addClass('is-active') _.delay(() => { diff --git a/client/js/components/editor.js b/client/js/components/editor.js index 44c08ef4..ebc9db06 100644 --- a/client/js/components/editor.js +++ b/client/js/components/editor.js @@ -150,8 +150,6 @@ module.exports = (alerts, pageEntryPath, socket) => { name: 'code-block', action: (editor) => { if (!mdeModalOpenState) { - mdeModalOpenState = true - if (mde.codemirror.doc.somethingSelected()) { vueCodeBlock.initContent = mde.codemirror.doc.getSelection() }