Fix highlight being eclipsed by other blocks.

This commit is contained in:
Neil Fraser
2016-07-09 11:46:54 -07:00
parent 5ea49cdf4e
commit e1ad58f2e9

View File

@@ -1413,7 +1413,12 @@ Blockly.BlockSvg.prototype.addSelect = function() {
Blockly.addClass_(/** @type {!Element} */ (this.svgGroup_),
'blocklySelected');
// Move the selected block to the top of the stack.
this.svgGroup_.parentNode.appendChild(this.svgGroup_);
var block = this;
do {
var root = block.getSvgRoot();
root.parentNode.appendChild(root);
block = block.getParent();
} while (block);
};
/**