diff --git a/core/flyout_base.js b/core/flyout_base.js index 8a3aeaaf6..a7b40ba10 100644 --- a/core/flyout_base.js +++ b/core/flyout_base.js @@ -371,8 +371,15 @@ Blockly.Flyout.prototype.updateDisplay_ = function() { Blockly.Flyout.prototype.positionAt_ = function(width, height, x, y) { this.svgGroup_.setAttribute("width", width); this.svgGroup_.setAttribute("height", height); - var transform = 'translate(' + x + 'px,' + y + 'px)'; - Blockly.utils.setCssTransform(this.svgGroup_, transform); + if (this.svgGroup_.tagName == 'svg') { + var transform = 'translate(' + x + 'px,' + y + 'px)'; + Blockly.utils.setCssTransform(this.svgGroup_, transform); + } else { + // IE and Edge don't support CSS transforms on SVG elements so + // it's important to set the transform on the SVG element itself + var transform = 'translate(' + x + ',' + y + ')'; + this.svgGroup_.setAttribute("transform", transform); + } // Update the scrollbar (if one exists). if (this.scrollbar_) {