Make context menus work again; fix dragging from the toolbox with variables.

This commit is contained in:
Rachel Fenichel
2016-09-07 15:49:20 -07:00
parent 706d74c81e
commit c373d6d091
3 changed files with 13 additions and 4 deletions

View File

@@ -647,7 +647,8 @@ Blockly.WorkspaceSvg.prototype.paste = function(xmlBlock) {
*/
Blockly.WorkspaceSvg.prototype.createVariable = function(name) {
Blockly.WorkspaceSvg.superClass_.createVariable.call(this, name);
if (this.toolbox_ && this.toolbox_.flyout_) {
// Don't refresh the toolbox if there's a drag in progress.
if (this.toolbox_ && this.toolbox_.flyout_ && !Blockly.Flyout.startFlyout_) {
this.toolbox_.refreshSelection();
}
};