diff --git a/web/app/components/workflow/hooks/use-workflow-comment.ts b/web/app/components/workflow/hooks/use-workflow-comment.ts index 64df63b2f2..aa717252a8 100644 --- a/web/app/components/workflow/hooks/use-workflow-comment.ts +++ b/web/app/components/workflow/hooks/use-workflow-comment.ts @@ -124,6 +124,11 @@ export const useWorkflowComment = () => { setPendingComment(null) }, [setPendingComment]) + useEffect(() => { + if (controlMode !== ControlMode.Comment) + setPendingComment(null) + }, [controlMode, setPendingComment]) + const handleCommentIconClick = useCallback(async (comment: WorkflowCommentList) => { setPendingComment(null)