From 1c5c28a82c970b229c398dacafb92780663c0c7f Mon Sep 17 00:00:00 2001 From: hjlarry Date: Thu, 9 Oct 2025 16:36:20 +0800 Subject: [PATCH] fix switch to cursor mode comment input still exists --- web/app/components/workflow/hooks/use-workflow-comment.ts | 5 +++++ 1 file changed, 5 insertions(+) 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)