From ec57922bb68501c7cdfb813d28b7c31658e8574d Mon Sep 17 00:00:00 2001 From: Kevin9703 <51311316+Kevin9703@users.noreply.github.com> Date: Thu, 12 Sep 2024 10:39:18 +0800 Subject: [PATCH] fix(workflow/hooks/use-shortcuts): resolve issue of copy shortcut not working in workflow debug and preview panel (#8249) Co-authored-by: Yi --- web/app/components/workflow/hooks/use-shortcuts.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/hooks/use-shortcuts.ts b/web/app/components/workflow/hooks/use-shortcuts.ts index 666c3a45ba..439b521a30 100644 --- a/web/app/components/workflow/hooks/use-shortcuts.ts +++ b/web/app/components/workflow/hooks/use-shortcuts.ts @@ -70,7 +70,8 @@ export const useShortcuts = (): void => { }) useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.c`, (e) => { - if (shouldHandleShortcut(e)) { + const { showDebugAndPreviewPanel, showInputsPanel } = workflowStore.getState() + if (shouldHandleShortcut(e) && !showDebugAndPreviewPanel && !showInputsPanel) { e.preventDefault() handleNodesCopy() }