fix(M02): 떠나기 확인 창 취소 뒤 초점을 시트 · 집계표 · 도면으로 되돌림

- 「저장 안 한 고침이 있음」 창에서 취소하면 고른 칸 입력 자리(시트) · 집계표 · 도면 iframe 으로 초점 복귀 — 키보드 그대로

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Kyw9qnkJ94pC1A4PfpDtA
This commit is contained in:
2026-09-28 22:31:10 +09:00
co-authored by Claude Opus 5.5
parent 5932f5d260
commit 60246df689
@@ -134,7 +134,13 @@ export function createMain(isAdmin: boolean, onSaved?: () => void): MainHandle {
window.addEventListener("beforeunload", guard);
const confirmLeave = async (): Promise<boolean> => {
if (!dirty) return true;
if (!(await showConfirmDialog(L("M02_DiscardConfirm")))) return false;
if (!(await showConfirmDialog(L("M02_DiscardConfirm")))) {
// 취소 — 초점을 시트(고른 칸 입력 자리) · 집계표 · 도면으로 돌려 키보드 그대로
host
.querySelector<HTMLElement>(".ss-input, .ui-sheet, iframe")
?.focus({ preventScroll: true });
return false;
}
dirty = false;
return true;
};