mirror of
https://github.com/google/blockly.git
synced 2026-05-22 20:10:11 +02:00
fix: Fix positioning of keyboard-driven workspace context menu in RTL (#9858)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user