mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-27 12:55:11 +01:00
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 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 pastedText = e.clipboardData.getData('text').substring(0, MAX_MESSAGE_LENGTH);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user