mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 15:25:58 +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 file = e.clipboardData?.files[0]
|
||||
if (file) {
|
||||
const text = e.clipboardData?.getData('text/plain')
|
||||
if (file && !text) {
|
||||
e.preventDefault()
|
||||
handleLocalFileUpload(file)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user