From 04ed77f82935a787844836153b95e2525dcd1d65 Mon Sep 17 00:00:00 2001 From: Nick Denry Date: Wed, 3 Jun 2020 22:09:01 +0300 Subject: [PATCH] KISS fix --- src/js/easymde.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/js/easymde.js b/src/js/easymde.js index 62aaa69..0587b91 100644 --- a/src/js/easymde.js +++ b/src/js/easymde.js @@ -342,13 +342,11 @@ function toggleFullScreen(editor) { } // Remove or set maxHeight - if (cm.getOption('fullScreen')) { - if (editor.options.maxHeight !== false) { + if (editor.options.maxHeight !== false) { + if (cm.getOption('fullScreen')) { cm.getScrollerElement().style.removeProperty('height'); sidebyside.style.removeProperty('height'); - } - } else { - if (editor.options.maxHeight !== false) { + } else { cm.getScrollerElement().style.height = editor.options.maxHeight; editor.setPreviewMaxHeight(); }