CI E2E 수정: 캔버스 빈 영역 클릭 시 마퀴 항상 시작하도록 타깃 판정 완화

This commit is contained in:
2025-11-17 18:59:28 +09:00
parent d08f050bfd
commit e4287b8567
+5 -3
View File
@@ -434,9 +434,11 @@ export function Canvas({ frame, onChange, onSelectIds, enableGuides = true }: Ca
tabIndex={0} tabIndex={0}
onKeyDown={onKeyDown} onKeyDown={onKeyDown}
onMouseDown={(e) => { onMouseDown={(e) => {
// 빈 캔버스 클릭 시 마퀴 시작 또는 선택 해제 // 빈 영역(객체/핸들이 아닌 영역) 클릭 시 마퀴 시작 또는 선택 해제
// 객체 onMouseDown에서 선택을 처리하므로, 여기서는 드래그 박스 시작만 담당 const t = e.target as HTMLElement
if ((e.target as HTMLElement).dataset.testid === 'wysiwyg-canvas') { const isObj = !!t.closest('[data-testid^="obj-"],[aria-label^="object "]')
const isHandle = !!t.closest('[data-testid^="resize-handle-"]')
if (!isObj && !isHandle) {
setSelectedIds([]) setSelectedIds([])
setMarquee({ active: true, x0: e.clientX, y0: e.clientY, x1: e.clientX, y1: e.clientY }) setMarquee({ active: true, x0: e.clientX, y0: e.clientY, x1: e.clientX, y1: e.clientY })
try { onSelectIds?.([]) } catch {} try { onSelectIds?.([]) } catch {}