fix: node shortcuts active in input fields (#3438)

This commit is contained in:
Pascal M
2024-04-13 03:48:39 +02:00
committed by GitHub
parent 6021ca5c31
commit a355225a83
4 changed files with 39 additions and 2 deletions

View File

@@ -721,8 +721,12 @@ export const useNodesInteractions = () => {
const {
setClipboardElements,
shortcutsDisabled,
} = workflowStore.getState()
if (shortcutsDisabled)
return
const {
getNodes,
} = store.getState()
@@ -741,8 +745,12 @@ export const useNodesInteractions = () => {
const {
clipboardElements,
shortcutsDisabled,
} = workflowStore.getState()
if (shortcutsDisabled)
return
const {
getNodes,
setNodes,
@@ -803,6 +811,13 @@ export const useNodesInteractions = () => {
if (getNodesReadOnly())
return
const {
shortcutsDisabled,
} = workflowStore.getState()
if (shortcutsDisabled)
return
const {
getNodes,
} = store.getState()
@@ -815,7 +830,7 @@ export const useNodesInteractions = () => {
for (const node of nodesToDelete)
handleNodeDelete(node.id)
}, [getNodesReadOnly, handleNodeDelete, store])
}, [getNodesReadOnly, handleNodeDelete, store, workflowStore])
return {
handleNodeDragStart,