diff --git a/components/angle-edit-dialog.tsx b/components/angle-edit-dialog.tsx index edd42c3e8..f1935b22d 100644 --- a/components/angle-edit-dialog.tsx +++ b/components/angle-edit-dialog.tsx @@ -171,7 +171,21 @@ export function AngleEditDialog({ return ( - + { + // 阻止点击遮罩层关闭对话框(防止意外触发导航) + if (isProcessing) { + e.preventDefault(); + } + }} + onEscapeKeyDown={(e) => { + // 处理过程中阻止 ESC 关闭 + if (isProcessing) { + e.preventDefault(); + } + }} + > {/* 紧凑标题栏 */}
diff --git a/components/image-annotator.tsx b/components/image-annotator.tsx index f593460a6..8c4766dfb 100644 --- a/components/image-annotator.tsx +++ b/components/image-annotator.tsx @@ -1752,14 +1752,16 @@ export function ImageAnnotator({ imageUrl, onConfirm, onCancel, initialResizeMod
)} - {/* 角度调整对话框 */} + {/* 角度调整对话框 - 包裹在阻止事件冒泡的 div 中 */} {showAngleEditDialog && originalImageUrl && ( - +
e.stopPropagation()} onMouseDown={(e) => e.stopPropagation()}> + +
)}
);