mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 11:26:52 +08:00
fix: node shortcuts active in input fields (#3438)
This commit is contained in:
@@ -125,7 +125,11 @@ const Workflow: FC<WorkflowProps> = memo(({
|
||||
handleEdgeDelete,
|
||||
handleEdgesChange,
|
||||
} = useEdgesInteractions()
|
||||
const { isValidConnection } = useWorkflow()
|
||||
const {
|
||||
isValidConnection,
|
||||
enableShortcuts,
|
||||
disableShortcuts,
|
||||
} = useWorkflow()
|
||||
|
||||
useOnViewportChange({
|
||||
onEnd: () => {
|
||||
@@ -161,6 +165,8 @@ const Workflow: FC<WorkflowProps> = memo(({
|
||||
edgeTypes={edgeTypes}
|
||||
nodes={nodes}
|
||||
edges={edges}
|
||||
onPointerDown={enableShortcuts}
|
||||
onMouseLeave={disableShortcuts}
|
||||
onNodeDragStart={handleNodeDragStart}
|
||||
onNodeDrag={handleNodeDrag}
|
||||
onNodeDragStop={handleNodeDragStop}
|
||||
|
||||
Reference in New Issue
Block a user