From ae8732040837a8a3fabdc7ef17ca40f49ee32f76 Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Thu, 5 Oct 2017 16:12:24 +0300 Subject: [PATCH] Preview pane cannot be resized after it has been hidden and then shown again --- www/code/inner.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/www/code/inner.js b/www/code/inner.js index 519e76bfa..02ed48e4b 100644 --- a/www/code/inner.js +++ b/www/code/inner.js @@ -93,7 +93,7 @@ define([ $previewContainer.toggle(); if ($previewContainer.is(':visible')) { forceDrawPreview(); - $codeMirror.removeClass('cp-ap-code-fullpage'); + $codeMirror.removeClass('cp-app-code-fullpage'); $previewButton.addClass('cp-toolbar-button-active'); framework._.sfCommon.setPadAttribute('previewMode', true, function (e) { if (e) { return console.log(e); } @@ -154,15 +154,16 @@ define([ e.preventDefault(); var x = e.pageX; var w = $target.width(); - - $(window).on('mouseup mousemove', function handler(evt) { + var handler = function (evt) { if (evt.type === 'mouseup') { $(window).off('mouseup mousemove', handler); return; } $target.css('width', (w - x + evt.pageX) + 'px'); editor.refresh(); - }); + }; + $(window).off('mouseup mousemove', handler); + $(window).on('mouseup mousemove', handler); }); }); @@ -335,7 +336,6 @@ define([ }).nThen(waitFor()); }).nThen(function (/*waitFor*/) { - console.log('hi'); andThen2(editor, CodeMirror, framework); }); };