소스 검색

fix: workflow disable shortcuts when feature panel occured (#4001)

zxhlyh 11 달 전
부모
커밋
05cab85579
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      web/app/components/workflow/hooks/use-nodes-interactions.ts

+ 6 - 3
web/app/components/workflow/hooks/use-nodes-interactions.ts

@@ -712,9 +712,10 @@ export const useNodesInteractions = () => {
     const {
       setClipboardElements,
       shortcutsDisabled,
+      showFeaturesPanel,
     } = workflowStore.getState()
 
-    if (shortcutsDisabled)
+    if (shortcutsDisabled || showFeaturesPanel)
       return
 
     const {
@@ -736,9 +737,10 @@ export const useNodesInteractions = () => {
     const {
       clipboardElements,
       shortcutsDisabled,
+      showFeaturesPanel,
     } = workflowStore.getState()
 
-    if (shortcutsDisabled)
+    if (shortcutsDisabled || showFeaturesPanel)
       return
 
     const {
@@ -803,9 +805,10 @@ export const useNodesInteractions = () => {
 
     const {
       shortcutsDisabled,
+      showFeaturesPanel,
     } = workflowStore.getState()
 
-    if (shortcutsDisabled)
+    if (shortcutsDisabled || showFeaturesPanel)
       return
 
     const {