Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: workflow delete node shortcut (#7076)

zxhlyh1571a8afd467
diff --git a/web/app/components/workflow/index.tsx b/web/app/components/workflow/index.tsx
index 34c7fc4dccd..c06e1b95246 100644
--- a/web/app/components/workflow/index.tsx
+++ b/web/app/components/workflow/index.tsx
@@ -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))