From 9fb23e92aff39cf1249715f6319bbcea6675f05a Mon Sep 17 00:00:00 2001
From: Paul Kaplan <pkaplan@media.mit.edu>
Date: Thu, 24 May 2018 14:55:39 -0400
Subject: [PATCH] Fix toolbox refreshing for new variables after switching tabs

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

diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx
index b275b463f..4141e6cc8 100644
--- a/src/containers/blocks.jsx
+++ b/src/containers/blocks.jsx
@@ -125,6 +125,8 @@ class Blocks extends React.Component {
         if (this.props.isVisible) { // Scripts tab
             this.workspace.setVisible(true);
             this.props.vm.refreshWorkspace();
+            // Re-enable toolbox refreshes without causing one. See #updateToolbox for more info.
+            this.workspace.toolboxRefreshEnabled_ = true;
             window.dispatchEvent(new Event('resize'));
         } else {
             this.workspace.setVisible(false);
-- 
GitLab