From 7fc5340da39c049d059aa0ae15ceb6a98ca58053 Mon Sep 17 00:00:00 2001 From: Diego Imbert <70353967+diegoimbert@users.noreply.github.com> Date: Wed, 10 Jun 2026 15:44:15 +0200 Subject: [PATCH] fix(frontend): allow copy/paste shortcuts inside ConfirmationModal (#9505) The modal's window keydown-capture handler called preventDefault() and stopPropagation() on every keystroke while open, which swallowed Cmd/Ctrl+C and Cmd/Ctrl+V (and blocked typing in any child input). Only intercept Enter/Escape without modifiers and let all other keys through. Co-authored-by: Claude Opus 4.8 --- .../common/confirmationModal/ConfirmationModal.svelte | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/common/confirmationModal/ConfirmationModal.svelte b/frontend/src/lib/components/common/confirmationModal/ConfirmationModal.svelte index 9dee3b6e87..1c7e6052eb 100644 --- a/frontend/src/lib/components/common/confirmationModal/ConfirmationModal.svelte +++ b/frontend/src/lib/components/common/confirmationModal/ConfirmationModal.svelte @@ -41,14 +41,21 @@ function onKeyDown(event: KeyboardEvent) { if (open && keyListen) { - event.stopPropagation() - event.preventDefault() + // Only intercept Enter/Escape (without modifiers) so shortcuts like + // Cmd/Ctrl+C and Cmd/Ctrl+V keep working inside the modal. + if (event.metaKey || event.ctrlKey || event.altKey) { + return + } switch (event.key) { case 'Enter': + event.stopPropagation() + event.preventDefault() dispatch('confirmed') onConfirmed?.() break case 'Escape': + event.stopPropagation() + event.preventDefault() dispatch('canceled') onCanceled?.() break