FIX:microsoft word text copy and paste error (#14905)

Co-authored-by: LinYing <linying@momenta.ai>
This commit is contained in:
ShadowJobs
2025-03-14 18:31:20 +08:00
committed by GitHub
parent 433374abea
commit 0587eb4956

View File

@@ -310,7 +310,8 @@ export const useFile = (fileConfig: FileUpload) => {
const handleClipboardPasteFile = useCallback((e: ClipboardEvent<HTMLTextAreaElement>) => {
const file = e.clipboardData?.files[0]
if (file) {
const text = e.clipboardData?.getData('text/plain')
if (file && !text) {
e.preventDefault()
handleLocalFileUpload(file)
}