feat(编辑能力): 修复内部对象撤销后粘贴崩溃
build.yaml / build (push) Successful in 38s

This commit is contained in:
xiaoqidun committed 2026-09-17 19:22:07 +08:00
1 parent fa8fec9830
commit 0f86c8d727
17 files changed
+842 -127

No files matched your search

+2
View File
@@ -1024,6 +1024,7 @@ export class CanvasEditor {
});
this.input = { input, item, face, fontChoice: item.fontChoice };
const editing = this.input;
item.artwork?.classList.add("edit-text-source");
item.surface.append(input);
input.addEventListener("input", () => this.options.onTextChange());
input.addEventListener("compositionstart", () => { editing.composing = true; });
@@ -1141,6 +1142,7 @@ export class CanvasEditor {
this.input = null;
if (editing) {
editing.input.remove();
editing.item.artwork?.classList.remove("edit-text-source");
document.fonts.delete(editing.face);
if (editing.item.draft && this.selected === editing.item) this.select(null);
this.options.onTextChange();