mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-12 00:59:52 +01:00
Message Input: Focus after clsing Attachment Modal
This commit is contained in:
parent
0079e21906
commit
2015b1a0d9
@ -244,7 +244,7 @@ const AttachmentModal: FC<OwnProps> = ({
|
|||||||
placeholder={lang('Caption')}
|
placeholder={lang('Caption')}
|
||||||
onUpdate={onCaptionUpdate}
|
onUpdate={onCaptionUpdate}
|
||||||
onSend={onSend}
|
onSend={onSend}
|
||||||
shouldSetFocus={isOpen}
|
shouldSetFocus={Boolean(attachments.length)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -919,7 +919,7 @@ const Composer: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
: botKeyboardPlaceholder || lang('Message')
|
: botKeyboardPlaceholder || lang('Message')
|
||||||
}
|
}
|
||||||
forcedPlaceholder={inlineBotHelp}
|
forcedPlaceholder={inlineBotHelp}
|
||||||
shouldSetFocus={isSymbolMenuOpen}
|
shouldSetFocus={!attachments.length}
|
||||||
shouldSuppressFocus={IS_SINGLE_COLUMN_LAYOUT && isSymbolMenuOpen}
|
shouldSuppressFocus={IS_SINGLE_COLUMN_LAYOUT && isSymbolMenuOpen}
|
||||||
shouldSuppressTextFormatter={isEmojiTooltipOpen || isMentionTooltipOpen || isInlineBotTooltipOpen}
|
shouldSuppressTextFormatter={isEmojiTooltipOpen || isMentionTooltipOpen || isInlineBotTooltipOpen}
|
||||||
onUpdate={setHtml}
|
onUpdate={setHtml}
|
||||||
|
@ -329,7 +329,9 @@ const MessageInput: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
focusInput();
|
if (shouldSetFocus) {
|
||||||
|
focusInput();
|
||||||
|
}
|
||||||
}, [currentChatId, focusInput, replyingToId, shouldSetFocus]);
|
}, [currentChatId, focusInput, replyingToId, shouldSetFocus]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user