fix(가이드): 538 처음 자리 이동을 모달 붙은 직후로 · 그림 고르기 입력을 모달 안에 둠

- 숨은 탭(ORCA)에서 requestAnimationFrame 이 안 돌아 [?] 가 지금 페이지로 안 감 → openModal 뒤 바로 이동
- 그림 고르기 입력을 글 영역 안(hidden)에 붙임 — 화면 검증 도구가 파일을 넣을 수 있게

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 09:06:47 +09:00
co-authored by Claude Opus 5.5
parent e04e88e371
commit 2d3074f911
2 changed files with 6 additions and 3 deletions
+4 -2
View File
@@ -241,6 +241,7 @@ async function openHelp(): Promise<void> {
const pages = GROUPS.flatMap((g) => guide.pages.filter((p) => p.page.startsWith(g.prefix)));
const start = firstAnchor(pages);
let flush = async (): Promise<boolean> => true;
let jump = (_anchor: string): void => undefined;
openModal({
title: TEXT.title,
closeLabel: TEXT.close,
@@ -312,10 +313,11 @@ async function openHelp(): Promise<void> {
renderHelpItem(page, item, true),
).flush;
body.append(el("div", { className: "ui-help__grid", children: [toc, article] }));
// 모달이 붙은 뒤 이동 — mount 는 붙기 전
requestAnimationFrame(() => goTo(start));
jump = goTo;
},
});
// 모달이 붙은 뒤 이동 — mount 는 붙기 전 · 숨은 탭에서도 되게 rAF 안 씀
jump(start);
}
export function createHelpButton(): HTMLButtonElement {
+2 -1
View File
@@ -120,8 +120,9 @@ export function attachHelpEditing(
// 그림 고르기 — 하나를 돌려 씀 · 고른 뒤 값 비움(같은 파일 다시 골라도 change)
const picker = el("input", {
attrs: { type: "file", accept: "image/png,image/jpeg,image/webp" },
attrs: { type: "file", accept: "image/png,image/jpeg,image/webp", hidden: "" },
});
article.append(picker);
let pickFor: { section: HTMLElement; name: string } | null = null;
picker.addEventListener("change", async () => {
const file = picker.files?.[0];