From e1ad58f2e9276d0fd35459ad94941f1a39a4dc51 Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Sat, 9 Jul 2016 11:46:54 -0700 Subject: [PATCH] Fix highlight being eclipsed by other blocks. --- core/block_svg.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/block_svg.js b/core/block_svg.js index cfae29027..af19bb4a1 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -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); }; /**