From 661307f5db2e74f78dcdec7ee15fb4b3a663cbc3 Mon Sep 17 00:00:00 2001 From: fa93hws Date: Thu, 18 May 2017 15:18:01 +1000 Subject: [PATCH 1/2] 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() From 0cbc2bc435112767d406b64d54c982cd30a84205 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Thu, 18 May 2017 19:47:45 -0400 Subject: [PATCH 2/2] Update editor.js --- client/js/components/editor.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/js/components/editor.js b/client/js/components/editor.js index 229bdb49..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() }