Fix cuon lech khi vua vao che do sua nhieu trang: slot active giu min-height
Build Windows portable / build (push) Canceled after 0s

Slot trang active cao theo anh that (CSS :has -> height auto), nhung luc vua
vao che do sua anh CHUA load nen slot cao ~0 -> scrollIntoView ban dau lech
ca cot va listener cuon (debounce 200ms) tu chuyen nham trang active (vao
trang 2 nhay sang trang 3). sizeEditSlot dat them min-height = chieu cao
uoc tinh nen slot khong bao gio sap ve 0.

Kem ket qua kiem chung build 31 tren app that (docs/12): dong lan style sau
commit tang dan tuyet doi (worst overlap 0pt) - fix mep muc dat; mảnh
"Path=/" con de la artifact NHIEM SAN trong file test cua user tu lan luu
bang build loi cu (reflow bao ton nhu marker) - khong phai bug moi.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-10 10:17:48 +07:00
co-authored by Claude Fable 5
parent 21314281a8
commit d812f72dc7
2 changed files with 16 additions and 1 deletions
+6 -1
View File
@@ -463,8 +463,13 @@ function editRoStamp() {
function sizeEditSlot(slot, p) {
const w = editStageWidth(p);
const h = Math.round((w * p.heightPt) / p.widthPt);
slot.style.width = w + "px";
slot.style.height = Math.round((w * p.heightPt) / p.widthPt) + "px";
slot.style.height = h + "px";
// Slot active cao theo ảnh thật (CSS :has cho height auto) — nhưng lúc ảnh
// CHƯA load mà để cao 0 thì cuộn ban đầu lệch cả cột và listener cuộn tự
// chuyển nhầm trang active → luôn giữ tối thiểu chiều cao ước tính.
slot.style.minHeight = h + "px";
}
function buildEditColumn() {