From 6367d5f27afe4ed65a01689cdfb03b494008bae3 Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Wed, 30 Oct 2019 14:15:54 -0700 Subject: [PATCH] Fix RTL bubble drag (#3356) --- core/bubble.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/bubble.js b/core/bubble.js index 4253afd7f..c3713d4f8 100644 --- a/core/bubble.js +++ b/core/bubble.js @@ -823,7 +823,9 @@ Blockly.Bubble.prototype.moveDuringDrag = function(dragSurface, newLoc) { */ Blockly.Bubble.prototype.getRelativeToSurfaceXY = function() { return new Blockly.utils.Coordinate( - this.anchorXY_.x + this.relativeLeft_, + this.workspace_.RTL ? + -this.relativeLeft_ + this.anchorXY_.x - this.width_ : + this.anchorXY_.x + this.relativeLeft_, this.anchorXY_.y + this.relativeTop_); };