Closed Bohdan-Tereta closed 6 years ago
We don't support switching from an auto-closing flyout to an always-open flyout (or the other way around) without a reinjection. Too many pieces of our code are initialized based on which type of flyout it is.
Thank you for an answer. The thing is this happens even without switching to auto-closing (maybe I've chosen not the best example in description). You can create a workspace with empty toolbox, set workspace.flyout_.autoClose = true; and after that populate a toolbox with blocks (I used no categories, blocks only). And this bug is reproducible in that case too. Can you please check that? Maybe we should reopen the issue.
Problem statement
When toolbox has no categories, flyout doesn't hide correctly after creating element from one of its blocks. It still takes some space and responds to events preventing blocks to be moved to where flyout previously was
Expected Behavior
Block changes its position
Actual Behavior
Block disappears
Steps to Reproduce
Stack Traces
No errors in console
Operating System and Browser
Desktop Chrome, latest, didn't try in other browsers
Additional Information
Possible solution: add
if (this.autoClose) { this.hide(); this.clearOldBlocks_(); this.reflow(); }
to Blockly.createBlock() definition in flyout_base.js