From e6379dacd8f49890b790adec7b7c98f1d0df8c0c Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 5 Oct 2018 18:05:39 +0200 Subject: [PATCH] Redraw the preview in the code app when the tab gets the focus --- www/code/inner.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/code/inner.js b/www/code/inner.js index 3d6b16d37..88515e638 100644 --- a/www/code/inner.js +++ b/www/code/inner.js @@ -8,6 +8,7 @@ define([ '/common/common-util.js', '/common/common-hash.js', '/common/modes.js', + '/common/visible.js', '/customize/messages.js', 'cm/lib/codemirror', @@ -49,6 +50,7 @@ define([ Util, Hash, Modes, + Visible, Messages, CMeditor) { @@ -222,6 +224,12 @@ define([ } }); + Visible.onChange(function (visible) { + if (visible) { + drawPreview(); + } + }); + return { forceDraw: forceDrawPreview, draw: drawPreview,