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

Implement extra null checks on flydown

Change-Id: I9fc9e5516c329ac8b286fc075ad0b863018164bb
parent ece2e892
......@@ -66,9 +66,14 @@ Blockly.BlockSvg.prototype.onMouseDown_ = (function(func) {
workspace.getParentSvg().parentNode.focus();
}
if (Blockly.FieldFlydown.openFieldFlydown_) {
if (goog.dom.contains(Blockly.getMainWorkspace().flydown_.svgGroup_, this.svgGroup_)) {
var flydown = Blockly.getMainWorkspace().getFlydown();
if (flydown) {
if (goog.dom.contains(flydown.svgGroup_, this.svgGroup_)) {
//prevent hiding the flyout if a child block is the target
Blockly.getMainWorkspace().flydown_.shouldHide = false;
flydown.shouldHide = false;
}
} else {
console.warn('openFieldFlydown_ was set but flydown_ was undefined!');
}
}
var retval = func.call(this, e);
......
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