Browse Source

fix(workflow/hooks/use-shortcuts): resolve issue of copy shortcut not working in workflow debug and preview panel (#8249)

Co-authored-by: Yi <yxiaoisme@gmail.com>
Kevin9703 7 months ago
parent
commit
ec57922bb6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      web/app/components/workflow/hooks/use-shortcuts.ts

+ 2 - 1
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()
     }