fix: node shortcuts active in input fields (#3438)
This commit is contained in:
parent
6021ca5c31
commit
a355225a83
4 changed files with 39 additions and 2 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue