From 5f76e2c8c21a67678763e7f2c3ba14d146cca283 Mon Sep 17 00:00:00 2001 From: Matt Hillsdon Date: Tue, 9 Jun 2026 15:07:19 +0100 Subject: [PATCH] fix: only show paste hint toast on keyboard copy/cut (#9962) This differs from the keyboard nav plugin but I think it's correct for an on-by-default world as it's very weird to encounter this toast on a touch device with and not helpful for mouse usage (e.g. in MakeCode's context menu). --- packages/blockly/core/shortcut_items.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/blockly/core/shortcut_items.ts b/packages/blockly/core/shortcut_items.ts index 3d7bdc979..3e1148332 100644 --- a/packages/blockly/core/shortcut_items.ts +++ b/packages/blockly/core/shortcut_items.ts @@ -230,7 +230,7 @@ export function registerCopy() { ? focused.getRelativeToSurfaceXY() : undefined; const copied = !!clipboard.copy(focused, copyCoords); - if (copied) { + if (copied && e instanceof KeyboardEvent) { showCopiedHint(workspace); } return copied; @@ -284,7 +284,7 @@ export function registerCut() { workspace.getAudioManager().play('delete'); e.preventDefault(); } - if (copyData) { + if (copyData && e instanceof KeyboardEvent) { showCutHint(workspace); } return !!copyData;