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>
This commit is contained in:
Kevin9703
2024-09-12 10:39:18 +08:00
committed by GitHub
parent 781d294f49
commit ec57922bb6

View File

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