mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-17 02:25:54 +08:00
FIX:microsoft word text copy and paste error (#14905)
Co-authored-by: LinYing <linying@momenta.ai>
This commit is contained in:
parent
433374abea
commit
0587eb4956
@ -310,7 +310,8 @@ export const useFile = (fileConfig: FileUpload) => {
|
|||||||
|
|
||||||
const handleClipboardPasteFile = useCallback((e: ClipboardEvent<HTMLTextAreaElement>) => {
|
const handleClipboardPasteFile = useCallback((e: ClipboardEvent<HTMLTextAreaElement>) => {
|
||||||
const file = e.clipboardData?.files[0]
|
const file = e.clipboardData?.files[0]
|
||||||
if (file) {
|
const text = e.clipboardData?.getData('text/plain')
|
||||||
|
if (file && !text) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
handleLocalFileUpload(file)
|
handleLocalFileUpload(file)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user