diff --git a/components/pages/work-flow.tsx b/components/pages/work-flow.tsx index a1d6062..c0431e3 100644 --- a/components/pages/work-flow.tsx +++ b/components/pages/work-flow.tsx @@ -178,6 +178,7 @@ const WorkFlow = React.memo(function WorkFlow() {
{ // 组件挂载时自动聚焦 - if (thumbnailsRef.current) { + if (thumbnailsRef.current && !isEditModalOpen) { thumbnailsRef.current.focus(); } @@ -132,7 +134,7 @@ export function ThumbnailGrid({ // 确保在数据变化时保持焦点 useEffect(() => { - if (thumbnailsRef.current && !isFocused) { + if (thumbnailsRef.current && !isFocused && !isEditModalOpen) { thumbnailsRef.current.focus(); } }, [taskObject.currentStage, isFocused]);