From a8cf79cee002572691b2b01b8f04fc9258578e4d Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 31 Oct 2026 17:14:51 +0900 Subject: [PATCH] =?UTF-8?q?fix(=EA=B3=B5=EC=9A=A9=20=ED=91=9C=20=EB=86=92?= =?UTF-8?q?=EC=9D=B4):=20=EC=B0=BD=20=EB=81=9D=EA=B9=8C=EC=A7=80=20?= =?UTF-8?q?=EC=85=88(spaceBelow)=EC=9D=B4=20=EC=97=B4=EB=A6=B0=20=EC=B0=BD?= =?UTF-8?q?=20=EA=B0=80=EB=A6=BC=EB=A7=89=20=C2=B7=20=EC=95=8C=EB=A6=BC(fi?= =?UTF-8?q?xed=20=C2=B7=20absolute)=EC=9D=84=20=ED=91=9C=20=EC=95=84?= =?UTF-8?q?=EB=9E=98=20=EC=9E=90=EB=A6=AC=EB=A1=9C=20=EC=9E=AC=EB=8D=98=20?= =?UTF-8?q?=ED=9D=A0=20(PLAN=20707-5=20=EB=94=B8=EB=A6=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - body 끝 가림막(창 높이)이 뒤 형제로 잡혀 창이 열린 채 다시 그리면 표가 최소 120px 로 짜부 - 흐름 밖(position fixed · absolute) 형제 = 자리 안 씀 - 부품 모음 견본(화면 끝 표 · 견본 창): 전 794 → 120px · 뒤 794 → 794px(밝음 · 어두움) - 시험 test_202_1 가림막 줄 덧붙임 Co-Authored-By: Claude Opus 5.5 --- resources/tester/helper_202_1_fill_below.cjs | 25 ++++++++++++------- .../tester/test_202_1_table_hint_bottom.py | 1 + ui_template/ui_template_data_table.ts | 3 ++- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/resources/tester/helper_202_1_fill_below.cjs b/resources/tester/helper_202_1_fill_below.cjs index 73fd59feb..190b7517c 100644 --- a/resources/tester/helper_202_1_fill_below.cjs +++ b/resources/tester/helper_202_1_fill_below.cjs @@ -44,17 +44,19 @@ const sty = (n) => ({ paddingBottom: n.css.paddingBottom ?? "0px", borderBottomWidth: n.css.borderBottomWidth ?? "0px", marginBottom: n.css.marginBottom ?? "0px", + position: n.css.position ?? "static", }); const box = { exports: {} }; -new Function("exports", "module", "require", "window", "document", "getComputedStyle", "ResizeObserver", js)( - box.exports, - box, - (p) => (p.endsWith(".css") ? {} : require(p)), - win, - { body: null }, - sty, - RO, -); +new Function( + "exports", + "module", + "require", + "window", + "document", + "getComputedStyle", + "ResizeObserver", + js, +)(box.exports, box, (p) => (p.endsWith(".css") ? {} : require(p)), win, { body: null }, sty, RO); const m = box.exports; // 문서: body(padding-bottom 8) > card(padding-bottom 12 · gap 8) > [root][avg 20][info 30][hint 40] @@ -81,4 +83,9 @@ hint.height = 60; observers.forEach((o) => o.fn()); out.afterHintGrow = parseFloat(root.style.maxHeight); out.firstMinusGrow = out.first - 20; + +// 열린 창 가림막(body 끝 · position fixed · 창 높이) = 아래 자리에 안 셈(707-5) +link(body, card, el("backdrop", { position: "fixed" }, 900)); +out.belowWithModal = m.spaceBelow(root); +out.belowAfterGrow = 3 * 8 + 20 + 30 + 60 + 12 + 8; console.log(JSON.stringify(out)); diff --git a/resources/tester/test_202_1_table_hint_bottom.py b/resources/tester/test_202_1_table_hint_bottom.py index 5d89460f6..f79393036 100644 --- a/resources/tester/test_202_1_table_hint_bottom.py +++ b/resources/tester/test_202_1_table_hint_bottom.py @@ -177,3 +177,4 @@ def test_창_끝까지_셈에_아래_안내_줄_포함(): assert r["below"] == r["belowExpected"] == 134 # 아래 줄 · 안내 줄 둘 + 여백 assert r["bottom"] == r["viewport"] # 문서 맨 아래 = 창 끝 → 페이지 스크롤 0 assert r["afterHintGrow"] == r["firstMinusGrow"] # 안내 줄이 늘면 표 칸이 그만큼 줄어듦 + assert r["belowWithModal"] == r["belowAfterGrow"] # 열린 창 가림막(fixed) = 아래 자리 아님 diff --git a/ui_template/ui_template_data_table.ts b/ui_template/ui_template_data_table.ts index 6fd8c5c2d..7ffe3a975 100644 --- a/ui_template/ui_template_data_table.ts +++ b/ui_template/ui_template_data_table.ts @@ -410,7 +410,8 @@ export function spaceBelow(el: HTMLElement): number { for (let s = node.nextElementSibling; s; s = s.nextElementSibling) { const h = s.getBoundingClientRect().height; const m = getComputedStyle(s); // 203 형제 위아래 바깥 여백도(B09 안내 글 margin-top) - if (h) sum += h + gap + px(m.marginTop) + px(m.marginBottom); + const out = m.position === "fixed" || m.position === "absolute"; // 열린 창 가림막 · 알림 = 자리 안 씀 + if (h && !out) sum += h + gap + px(m.marginTop) + px(m.marginBottom); } sum += px(own.marginBottom) + px(around.paddingBottom) + px(around.borderBottomWidth); }