fix(project): fit goal rows to text height

This commit is contained in:
2026-10-03 07:59:22 +09:00
parent b32f2ac3a3
commit 2c8542339d
12 changed files with 104 additions and 21 deletions
+4 -1
View File
@@ -8904,8 +8904,11 @@
applyFold(h, true);
});
});
// 글 칸 높이 맞추기 — 접혀 안 보이는 칸은 건너뛴다(높이 0 으로 재져 펼쳤을 때 글이 잘림). 펼칠 때 다시 잰다.
// contenteditable 글 칸은 내용의 자연 높이를 쓴다. 표가 가장 높은 칸에 행을 맞추고
// 짧은 칸은 상단에 둔다. 글·폭·부분 서식 변경과 숨긴 분기에서도 오래된 높이가 남지 않는다.
function fit(ta) {
if (ta.tagName !== "TEXTAREA") { ta.style.removeProperty("height"); return; }
// 예전 textarea 템플릿도 지원하되 접힌 칸은 펼친 뒤 잰다.
if (!ta.offsetParent) return;
ta.style.height = "auto";
ta.style.height = ta.scrollHeight + "px";