diff --git a/packages/blockly/core/workspace_svg.ts b/packages/blockly/core/workspace_svg.ts index b197baa0d2f..68a9db28b5a 100644 --- a/packages/blockly/core/workspace_svg.ts +++ b/packages/blockly/core/workspace_svg.ts @@ -1784,8 +1784,8 @@ export class WorkspaceSvg if (e instanceof PointerEvent) { location = new Coordinate(e.clientX, e.clientY); } else { - // TODO: Get the location based on the workspace cursor location - location = svgMath.wsToScreenCoordinates(this, new Coordinate(5, 5)); + const x = this.RTL ? this.getWidth() - 5 : 5; + location = svgMath.wsToScreenCoordinates(this, new Coordinate(x, 5)); } ContextMenu.show(e, menuOptions, this.RTL, this, location);