From cf838e11cb2956304d9fcddd25c7493559768679 Mon Sep 17 00:00:00 2001
From: Paul Kaplan <pkaplan@media.mit.edu>
Date: Thu, 1 Jun 2017 09:15:51 -0400
Subject: [PATCH] Show workspace before triggering resize

---
 src/containers/blocks.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx
index 13b3975fd..0652e3374 100644
--- a/src/containers/blocks.jsx
+++ b/src/containers/blocks.jsx
@@ -64,8 +64,8 @@ class Blocks extends React.Component {
 
         // @todo hack to resize blockly manually in case resize happened while hidden
         if (this.props.isVisible) { // Scripts tab
-            window.dispatchEvent(new Event('resize'));
             this.workspace.setVisible(true);
+            window.dispatchEvent(new Event('resize'));
             this.workspace.toolbox_.refreshSelection();
         } else {
             this.workspace.setVisible(false);
-- 
GitLab