From 451b8e3ff582355e15aaa2fd1a0c7781ec2efa8b Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Mon, 11 May 2026 14:43:19 -0700 Subject: [PATCH] fix: Fix positioning of keyboard-driven workspace context menu in RTL --- packages/blockly/core/workspace_svg.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);