fix: workflow delete node shortcut (#7076)

This commit is contained in:
zxhlyh 2024-08-08 10:42:08 +08:00 committed by GitHub
parent 67a2f14cef
commit 1571a8afd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -264,7 +264,12 @@ const Workflow: FC<WorkflowProps> = memo(({
const { shortcutsEnabled: workflowHistoryShortcutsEnabled } = useWorkflowHistoryStore()
useKeyPress(['delete', 'backspace'], handleNodesDelete)
useKeyPress(['delete', 'backspace'], (e) => {
if (isEventTargetInputArea(e.target as HTMLElement))
return
handleNodesDelete()
})
useKeyPress(['delete', 'backspace'], handleEdgeDelete)
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.c`, (e) => {
if (isEventTargetInputArea(e.target as HTMLElement))