From cd412b678e5abe0c69004e2ea6df41b0d5779229 Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Wed, 30 Oct 2019 11:44:05 -0700 Subject: [PATCH] Remove firefox workaround that is no longer needed (#3349) --- core/flyout_vertical.js | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/core/flyout_vertical.js b/core/flyout_vertical.js index 0e8eb0a19..9a6b52e38 100644 --- a/core/flyout_vertical.js +++ b/core/flyout_vertical.js @@ -333,30 +333,6 @@ Blockly.VerticalFlyout.prototype.getClientRect = function() { var width = flyoutRect.width; return new Blockly.utils.Rect(-BIG_NUM, BIG_NUM, -BIG_NUM, left + width); } else { // Right - // Firefox sometimes reports the wrong value for the client rect. - // See https://github.com/google/blockly/issues/1425 and - // https://bugzilla.mozilla.org/show_bug.cgi?id=1066435 - if (Blockly.utils.userAgent.GECKO && - this.targetWorkspace_ && this.targetWorkspace_.isMutator) { - // The position of the left side of the mutator workspace in pixels - // relative to the window origin. - var targetWsLeftPixels = - this.targetWorkspace_.svgGroup_.getBoundingClientRect().x; - // The client rect is in pixels relative to the window origin. When the - // browser gets the wrong value it reports that the flyout left is the - // same as the mutator workspace left. - // We know that in a mutator workspace with the flyout on the right, the - // visible area of the workspace should be more than ten pixels wide. If - // the browser reports that the flyout is within ten pixels of the left - // side of the workspace, ignore it and manually calculate the value. - if (Math.abs(targetWsLeftPixels - left) < 10) { - // If we're in a mutator, its scale is always 1, purely because of some - // oddities in our rendering optimizations. The actual scale is the - // same as the scale on the parent workspace. - var scale = this.targetWorkspace_.options.parentWorkspace.scale; - left += this.leftEdge_ * scale; - } - } return new Blockly.utils.Rect(-BIG_NUM, BIG_NUM, left, BIG_NUM); } };