Skip to content

Commit

Permalink
fix(workflow/hooks/use-shortcuts): resolve issue of copy shortcut not…
Browse files Browse the repository at this point in the history
… working in workflow debug and preview panel (#8249)

Co-authored-by: Yi <[email protected]>
  • Loading branch information
Kevin9703 and YIXIAO0 authored Sep 12, 2024
1 parent 781d294 commit ec57922
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/app/components/workflow/hooks/use-shortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit ec57922

Please sign in to comment.