From e74705684d33699fd9f8aca07246371fbd510019 Mon Sep 17 00:00:00 2001 From: "wanjun.shi" <2668923029@qq.com> Date: Mon, 2 Dec 2024 16:52:32 +0800 Subject: [PATCH 1/2] fix: With Chinese IME, placeholder can't disappear. --- packages/quill/src/core/quill.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/quill/src/core/quill.ts b/packages/quill/src/core/quill.ts index dae5267bcb..25780f8327 100644 --- a/packages/quill/src/core/quill.ts +++ b/packages/quill/src/core/quill.ts @@ -231,7 +231,7 @@ class Quill { this.theme.addModule('uiNode'); this.theme.init(); this.emitter.on(Emitter.events.EDITOR_CHANGE, (type) => { - if (type === Emitter.events.TEXT_CHANGE) { + if ([Emitter.events.TEXT_CHANGE, Emitter.events.COMPOSITION_START, Emitter.events.COMPOSITION_END].includes(type)) { this.root.classList.toggle('ql-blank', this.editor.isBlank()); } }); From 49a09127c5961430617525766b1b2bdfe0f4744e Mon Sep 17 00:00:00 2001 From: "wanjun.shi" <2668923029@qq.com> Date: Mon, 2 Dec 2024 17:08:22 +0800 Subject: [PATCH 2/2] fix: just for composition-start --- packages/quill/src/core/quill.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/quill/src/core/quill.ts b/packages/quill/src/core/quill.ts index 25780f8327..110ba4a459 100644 --- a/packages/quill/src/core/quill.ts +++ b/packages/quill/src/core/quill.ts @@ -231,7 +231,7 @@ class Quill { this.theme.addModule('uiNode'); this.theme.init(); this.emitter.on(Emitter.events.EDITOR_CHANGE, (type) => { - if ([Emitter.events.TEXT_CHANGE, Emitter.events.COMPOSITION_START, Emitter.events.COMPOSITION_END].includes(type)) { + if ([Emitter.events.TEXT_CHANGE, Emitter.events.COMPOSITION_START].includes(type)) { this.root.classList.toggle('ql-blank', this.editor.isBlank()); } });