Composer: Fix pasting from clipboard (#1692)
This commit is contained in:
parent
7d1591ee86
commit
b9b1e0a306
@ -26,13 +26,13 @@ const useClipboardPaste = (
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
const pastedText = e.clipboardData.getData('text').substring(0, MAX_MESSAGE_LENGTH);
|
||||
const { items } = e.clipboardData;
|
||||
let files: File[] = [];
|
||||
|
||||
if (items.length > 0) {
|
||||
files = await getFilesFromDataTransferItems(items);
|
||||
}
|
||||
const pastedText = e.clipboardData.getData('text').substring(0, MAX_MESSAGE_LENGTH);
|
||||
|
||||
if (files.length === 0 && !pastedText) {
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user