From 9b7501f37471ecdd29784b1327da2d0b54cc5bf7 Mon Sep 17 00:00:00 2001 From: Willard21 Date: Sat, 5 Sep 2020 17:28:24 -0500 Subject: [PATCH] Fix HTML editor resize bug Fixes Khan/live-editor#738 --- build/js/live-editor.ui.js | 2 +- js/live-editor.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/js/live-editor.ui.js b/build/js/live-editor.ui.js index 369e5d6f6..7b70e0b46 100644 --- a/build/js/live-editor.ui.js +++ b/build/js/live-editor.ui.js @@ -2092,7 +2092,7 @@ window.LiveEditor = Backbone.View.extend({ updateCanvasSize: function updateCanvasSize(width, height) { width = width || this.defaultOutputWidth; - height = height || this.defaultOutputHeight; + height = height || this.editorHeight || this.defaultOutputHeight; this.$el.find(this.dom.CANVAS_WRAP).width(width); this.$el.find(this.dom.ALL_OUTPUT).height(height); diff --git a/js/live-editor.js b/js/live-editor.js index b4792b91e..3fd971dd4 100644 --- a/js/live-editor.js +++ b/js/live-editor.js @@ -1402,7 +1402,7 @@ window.LiveEditor = Backbone.View.extend({ updateCanvasSize: function(width, height) { width = width || this.defaultOutputWidth; - height = height || this.defaultOutputHeight; + height = height || this.editorHeight || this.defaultOutputHeight; this.$el.find(this.dom.CANVAS_WRAP).width(width); this.$el.find(this.dom.ALL_OUTPUT).height(height);