From 87ab88954deb8f3fe66aae4b83aa415ca768362e Mon Sep 17 00:00:00 2001 From: Sam El-Husseini <16690124+samelhusseini@users.noreply.github.com> Date: Thu, 10 May 2018 20:30:37 -0700 Subject: [PATCH] Fix RTL mutators in Edge and IE --- core/flyout_base.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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_) {