diff --git a/src/components/CustomRoadmap/FlowRoadmapRenderer.tsx b/src/components/CustomRoadmap/FlowRoadmapRenderer.tsx index 3ba55d01b..f64bf7cad 100644 --- a/src/components/CustomRoadmap/FlowRoadmapRenderer.tsx +++ b/src/components/CustomRoadmap/FlowRoadmapRenderer.tsx @@ -62,7 +62,10 @@ export function FlowRoadmapRenderer(props: FlowRoadmapRendererProps) { } const handleTopicRightClick = useCallback((e: MouseEvent, node: Node) => { - const target = e?.currentTarget as HTMLDivElement; + const target = + node?.type === 'todo' + ? document.querySelector(`[data-id="${node.id}"]`) + : (e?.currentTarget as HTMLDivElement); if (!target) { return; } diff --git a/src/components/TeamProgress/MemberCustomProgressModal.tsx b/src/components/TeamProgress/MemberCustomProgressModal.tsx index e2df48032..95f47ffa1 100644 --- a/src/components/TeamProgress/MemberCustomProgressModal.tsx +++ b/src/components/TeamProgress/MemberCustomProgressModal.tsx @@ -161,7 +161,10 @@ export function MemberCustomProgressModal(props: ProgressMapProps) { return; } - const target = e?.currentTarget as HTMLDivElement; + const target = + node?.type === 'todo' + ? document.querySelector(`[data-id="${node.id}"]`) + : (e?.currentTarget as HTMLDivElement); if (!target) { return; } @@ -237,7 +240,6 @@ export function MemberCustomProgressModal(props: ProgressMapProps) {
{