diff --git a/web/app/components/workflow/hooks/use-nodes-interactions.ts b/web/app/components/workflow/hooks/use-nodes-interactions.ts index beb3f3733d..f885236ad9 100644 --- a/web/app/components/workflow/hooks/use-nodes-interactions.ts +++ b/web/app/components/workflow/hooks/use-nodes-interactions.ts @@ -1712,7 +1712,7 @@ export const useNodesInteractions = () => { nodeId: node.id, }, }) - handleNodeSelect(node.id) + handleNodeSelect(node.id, true) }, [workflowStore, handleNodeSelect], ) diff --git a/web/app/components/workflow/nodes/_base/node.tsx b/web/app/components/workflow/nodes/_base/node.tsx index ed83c58b6e..43f8e5773e 100644 --- a/web/app/components/workflow/nodes/_base/node.tsx +++ b/web/app/components/workflow/nodes/_base/node.tsx @@ -79,6 +79,7 @@ const BaseNode: FC = ({ const appId = useStore(s => s.appId) const { nodePanelPresence } = useCollaboration(appId as string) const controlMode = useStore(s => s.controlMode) + const isContextMenuTarget = useStore(s => s.nodeMenu?.nodeId === id) const currentUserPresence = useMemo(() => { const userId = userProfile?.id || '' @@ -123,7 +124,7 @@ const BaseNode: FC = ({ const { hasNodeInspectVars } = useInspectVarsCrud() const isLoading = data._runningStatus === NodeRunningStatus.Running || data._singleRunningStatus === NodeRunningStatus.Running const hasVarValue = hasNodeInspectVars(id) - const showSelectedBorder = Boolean(data.selected || data._isBundled || data._isEntering) + const showSelectedBorder = Boolean(data.selected || isContextMenuTarget || data._isBundled || data._isEntering) const { showRunningBorder, showSuccessBorder,