Fix 2 loi UX sua-trong-form tren file Canva: (1) sau commit tra lai anh goc ngay + hint 'Dang ap dung...' thay vi hien anh-render-an (chu cu da xoa) nhieu giay gay cam giac chu bien mat; (2) vong no indices reflow noi pad DOC 8pt - dau tieng Viet (nga cua E~) ve bang op rieng co tam ngoai bbox+2pt nen sot lai dau lo lung sau sua
Build Windows portable / build (push) Canceled after 0s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-08 18:37:27 +07:00
co-authored by Claude Fable 5
parent 390fb82dd6
commit f78ed08d10
2 changed files with 16 additions and 7 deletions
+5 -2
View File
@@ -2770,9 +2770,12 @@ function startBlockTextEdit(o, lines, ev) {
ce.remove();
ov.querySelectorAll(".edit-box").forEach((b) => { b.style.display = ""; });
const changed = save && text.trim() && text !== original;
// Huỷ/không đổi gì → trả lại ảnh trang gốc (đang hiện bản ẩn run sửa).
if (!changed && bgSwapped) img.src = prevSrc;
// LUÔN trả lại ảnh trang gốc ngay (đang hiện bản ẩn run sửa): trong lúc
// engine áp thay đổi (file phức tạp mất vài giây) người dùng thấy chữ CŨ
// thay vì khoảng trống — hết cảm giác "chữ biến mất".
if (bgSwapped) img.src = prevSrc;
if (changed) {
$("editHint").textContent = "Đang áp dụng thay đổi…";
stageEditOp({
op: "reflowText",
indices: allRuns.map((r) => r.index),