Hi,
The documentation about embedding resizable Blockly workspaces seems to be outdated:
https://developers.google.com/blockly/guides/configure/web/resizable
It seems that nowadays, Blockly itself takes care about resizing the workspace. Thus, as far as I can see, the Script should only read:
<script>
var blocklyArea = document.getElementById('blocklyArea');
var workspace = Blockly.inject(blocklyArea,
{toolbox: document.getElementById('toolbox')});
Blockly.svgResize(workspace);
</script>
I'm not even sure if the last line is even still necessary.
The problem with the current example, is that the Blockly Workspace resizes itself on the "resize" event according to the blocklyDiv. Only afterwards, the blocklyDiv is resized to the size of the blocklyArea element. This leads to the effect, that the Blockly workspace has the size, the blocklyArea previously had, not the size it currently has.
Same holds for the live demo:
Best
Robert