Commit ece2e892 authored by Evan W. Patton's avatar Evan W. Patton Committed by Susan Rati Lane

Fix exception caused by attempting to open flydown during drag from toolbox

Change-Id: Iaac765df9371acb8672df71bb12b22e02fd40cb9
parent aebfccf0
......@@ -133,10 +133,14 @@ Blockly.FieldFlydown.prototype.onMouseOut_ = function(e) {
Blockly.FieldFlydown.prototype.showFlydownMaker_ = function() {
var field = this; // Name receiver in variable so can close over this variable in returned thunk
return function() {
if (Blockly.FieldFlydown.showPid_ != 0) {
if (Blockly.FieldFlydown.showPid_ !== 0 && Blockly.dragMode_ === Blockly.DRAG_NONE) {
try {
field.showFlydown_();
Blockly.FieldFlydown.showPid_ = 0;
} catch (e) {
console.error('Failed to show flydown', e);
}
}
Blockly.FieldFlydown.showPid_ = 0;
};
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment