Skip to content

Commit

Permalink
fix: workflow disable shortcuts when feature panel occured (#4001)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxhlyh authored Apr 30, 2024
1 parent b72fbe2 commit 05cab85
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions web/app/components/workflow/hooks/use-nodes-interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,9 +712,10 @@ export const useNodesInteractions = () => {
const {
setClipboardElements,
shortcutsDisabled,
showFeaturesPanel,
} = workflowStore.getState()

if (shortcutsDisabled)
if (shortcutsDisabled || showFeaturesPanel)
return

const {
Expand All @@ -736,9 +737,10 @@ export const useNodesInteractions = () => {
const {
clipboardElements,
shortcutsDisabled,
showFeaturesPanel,
} = workflowStore.getState()

if (shortcutsDisabled)
if (shortcutsDisabled || showFeaturesPanel)
return

const {
Expand Down Expand Up @@ -803,9 +805,10 @@ export const useNodesInteractions = () => {

const {
shortcutsDisabled,
showFeaturesPanel,
} = workflowStore.getState()

if (shortcutsDisabled)
if (shortcutsDisabled || showFeaturesPanel)
return

const {
Expand Down

0 comments on commit 05cab85

Please sign in to comment.