Composer: Do not blur when clicking on messages on Android

This commit is contained in:
Alexander Zinchuk 2021-08-23 03:38:25 +03:00
parent 18c88042e9
commit 64bdaae142

View File

@ -1,11 +1,11 @@
import React from '../../../lib/teact/teact'; import React from '../../../lib/teact/teact';
import { EDITABLE_INPUT_ID } from '../../../config'; import { EDITABLE_INPUT_ID } from '../../../config';
import { IS_SINGLE_COLUMN_LAYOUT } from '../../../util/environment'; import { IS_IOS } from '../../../util/environment';
export function preventMessageInputBlur(e: React.MouseEvent<HTMLElement>) { export function preventMessageInputBlur(e: React.MouseEvent<HTMLElement>) {
if ( if (
IS_SINGLE_COLUMN_LAYOUT IS_IOS
|| !document.activeElement || !document.activeElement
|| document.activeElement.id !== EDITABLE_INPUT_ID || document.activeElement.id !== EDITABLE_INPUT_ID
|| e.target !== e.currentTarget || e.target !== e.currentTarget