Skip to content

Commit 806faee

Browse files
author
work-2025
committed
1 parent ebe16ca commit 806faee

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/quill/src/core/quill.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class Quill {
231231
this.theme.addModule('uiNode');
232232
this.theme.init();
233233
this.emitter.on(Emitter.events.EDITOR_CHANGE, (type) => {
234-
if (type === Emitter.events.TEXT_CHANGE) {
234+
if ([Emitter.events.TEXT_CHANGE, Emitter.events.COMPOSITION_START].includes(type)) {
235235
this.root.classList.toggle('ql-blank', this.editor.isBlank());
236236
}
237237
});

packages/quill/src/modules/clipboard.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ class Clipboard extends Module<ClipboardOptions> {
170170

171171
onCaptureCopy(e: ClipboardEvent, isCut = false) {
172172
if (e.defaultPrevented) return;
173-
e.preventDefault();
174173
const [range] = this.quill.selection.getRange();
175174
if (range == null) return;
175+
e.preventDefault();
176176
const { html, text } = this.onCopy(range, isCut);
177177
e.clipboardData?.setData('text/plain', text);
178178
e.clipboardData?.setData('text/html', html);
@@ -350,6 +350,7 @@ function isLine(node: Node, scroll: ScrollBlot) {
350350
'table',
351351
'td',
352352
'tr',
353+
'th',
353354
'ul',
354355
'video',
355356
].includes(node.tagName.toLowerCase());

0 commit comments

Comments
 (0)