Composer: Fix pasting image from clipboard on Linux (#1451)
This commit is contained in:
parent
b95e804a9f
commit
ae3f2f9c21
@ -24,7 +24,8 @@ export default (
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { items } = e.clipboardData;
|
const { items } = e.clipboardData;
|
||||||
const media = Array.from(items).find((item) => CLIPBOARD_ACCEPTED_TYPES.includes(item.type));
|
const media = Array.from(items)
|
||||||
|
.find((item) => CLIPBOARD_ACCEPTED_TYPES.includes(item.type) && item.kind === 'file');
|
||||||
const file = media && media.getAsFile();
|
const file = media && media.getAsFile();
|
||||||
const pastedText = e.clipboardData.getData('text').substring(0, MAX_MESSAGE_LENGTH);
|
const pastedText = e.clipboardData.getData('text').substring(0, MAX_MESSAGE_LENGTH);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user