From 661307f5db2e74f78dcdec7ee15fb4b3a663cbc3 Mon Sep 17 00:00:00 2001 From: fa93hws Date: Thu, 18 May 2017 15:18:01 +1000 Subject: [PATCH] fixed code block bugs Please enter the commit message for your changes. Lines starting --- client/js/components/editor-codeblock.js | 1 + client/js/components/editor.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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..229bdb49 100644 --- a/client/js/components/editor.js +++ b/client/js/components/editor.js @@ -150,7 +150,7 @@ module.exports = (alerts, pageEntryPath, socket) => { name: 'code-block', action: (editor) => { if (!mdeModalOpenState) { - mdeModalOpenState = true + // mdeModalOpenState = true if (mde.codemirror.doc.somethingSelected()) { vueCodeBlock.initContent = mde.codemirror.doc.getSelection()