diff --git a/src/MarkdownEditor/editor/utils/keyboard.ts b/src/MarkdownEditor/editor/utils/keyboard.ts index 9aa1cb2a..c10a49d0 100644 --- a/src/MarkdownEditor/editor/utils/keyboard.ts +++ b/src/MarkdownEditor/editor/utils/keyboard.ts @@ -202,11 +202,15 @@ export class KeyboardTask { ); }; input.onchange = async (e: any) => { + if (input.dataset.readonly) { + return; + } + input.dataset.readonly = 'true'; const hideLoading = message.loading('Uploading...'); try { const url = (await this.props?.image?.upload?.( - Array.from(e.target.files) || [], + (Array.from(e.target.files) as File[]) || [], )) || []; [url].flat().forEach((u: string) => { insertMedia(u);