mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-27 04:45:08 +01:00
Composer / Attachement: Fix multiple paste (#1014)
This commit is contained in:
parent
747a3cc5bd
commit
2ddd3a3087
@ -2,7 +2,7 @@ import { StateHookSetter, useEffect } from '../../../../lib/teact/teact';
|
||||
import { ApiAttachment, ApiMessage } from '../../../../api/types';
|
||||
|
||||
import buildAttachment from '../helpers/buildAttachment';
|
||||
import { EDITABLE_INPUT_ID } from '../../../../config';
|
||||
import { EDITABLE_INPUT_ID, EDITABLE_INPUT_MODAL_ID } from '../../../../config';
|
||||
|
||||
const CLIPBOARD_ACCEPTED_TYPES = ['image/png', 'image/jpeg', 'image/gif'];
|
||||
const MAX_MESSAGE_LENGTH = 4096;
|
||||
@ -18,8 +18,8 @@ export default (
|
||||
return;
|
||||
}
|
||||
|
||||
const input = document.getElementById(EDITABLE_INPUT_ID);
|
||||
if (input !== document.activeElement) {
|
||||
const input = document.activeElement;
|
||||
if (!input || ![EDITABLE_INPUT_ID, EDITABLE_INPUT_MODAL_ID].includes(input.id)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user