Skip to content

Commit 4456234

Browse files
authored
fix: dont show progress bar when pasting text (#989)
1 parent 438eb74 commit 4456234

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/web/src/views/CodemirrorEditor.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,10 @@ function createFormTextArea(dom: HTMLTextAreaElement) {
370370
return
371371
}
372372
const items = [...event.clipboardData.items].map(item => item.getAsFile()).filter(item => item != null && beforeUpload(item)) as File[]
373+
// 即使return了,粘贴的文本内容也会被插入
374+
if (items.length === 0) {
375+
return
376+
}
373377
// start progress
374378
const intervalId = setInterval(() => {
375379
const newProgress = progressValue.value + 1

0 commit comments

Comments
 (0)