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>
pull/8289/head
Kevin9703 2 years ago committed by GitHub
parent 781d294f49
commit ec57922bb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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()
}

Loading…
Cancel
Save