From c49f4dd11ed77526794bac83d3ac3b7902f9e4ff Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 3 Sep 2018 20:47:45 +0300 Subject: [PATCH] don't hook auxiliary CMs fixes #491 --- edit/codemirror-editing-hooks.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/edit/codemirror-editing-hooks.js b/edit/codemirror-editing-hooks.js index 4297eb05..31d0ce5d 100644 --- a/edit/codemirror-editing-hooks.js +++ b/edit/codemirror-editing-hooks.js @@ -43,6 +43,9 @@ onDOMscriptReady('/codemirror.js').then(() => { }); CodeMirror.defineInitHook(cm => { + if (!cm.display.wrapper.closest('#sections')) { + return; + } if (prefs.get('editor.livePreview') && styleId) { cm.on('changes', updatePreview); }