@@ -148,6 +148,7 @@ class Blocks extends React.Component {
148
148
// @todo change this when blockly supports UI events
149
149
addFunctionListener ( this . workspace , 'translate' , this . onWorkspaceMetricsChange ) ;
150
150
addFunctionListener ( this . workspace , 'zoom' , this . onWorkspaceMetricsChange ) ;
151
+ this . workspace . getToolbox ( ) . selectItemByPosition ( 0 ) ;
151
152
152
153
this . attachVM ( ) ;
153
154
// Only update blocks/vm locale when visible to avoid sizing issues
@@ -224,11 +225,11 @@ class Blocks extends React.Component {
224
225
this . ScratchBlocks . ScratchMsgs . setLocale ( this . props . locale ) ;
225
226
this . props . vm . setLocale ( this . props . locale , this . props . messages )
226
227
. then ( ( ) => {
227
- // this.workspace.getFlyout().setRecyclingEnabled(false);
228
+ this . workspace . getFlyout ( ) . setRecyclingEnabled ( false ) ;
228
229
this . props . vm . refreshWorkspace ( ) ;
229
230
this . requestToolboxUpdate ( ) ;
230
231
this . withToolboxUpdates ( ( ) => {
231
- // this.workspace.getFlyout().setRecyclingEnabled(true);
232
+ this . workspace . getFlyout ( ) . setRecyclingEnabled ( true ) ;
232
233
} ) ;
233
234
} ) ;
234
235
}
@@ -239,6 +240,7 @@ class Blocks extends React.Component {
239
240
// const categoryId = this.workspace.toolbox_.getSelectedItem().getId();
240
241
// const offset = this.workspace.toolbox_.getCategoryScrollOffset();
241
242
this . workspace . updateToolbox ( this . props . toolboxXML ) ;
243
+ this . workspace . refreshToolboxSelection ( ) ;
242
244
this . _renderedToolboxXML = this . props . toolboxXML ;
243
245
244
246
// In order to catch any changes that mutate the toolbox during "normal runtime"
0 commit comments