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')}
|
||||
onUpdate={onCaptionUpdate}
|
||||
onSend={onSend}
|
||||
shouldSetFocus={isOpen}
|
||||
shouldSetFocus={Boolean(attachments.length)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -919,7 +919,7 @@ const Composer: FC<OwnProps & StateProps & DispatchProps> = ({
|
||||
: botKeyboardPlaceholder || lang('Message')
|
||||
}
|
||||
forcedPlaceholder={inlineBotHelp}
|
||||
shouldSetFocus={isSymbolMenuOpen}
|
||||
shouldSetFocus={!attachments.length}
|
||||
shouldSuppressFocus={IS_SINGLE_COLUMN_LAYOUT && isSymbolMenuOpen}
|
||||
shouldSuppressTextFormatter={isEmojiTooltipOpen || isMentionTooltipOpen || isInlineBotTooltipOpen}
|
||||
onUpdate={setHtml}
|
||||
|
@ -329,7 +329,9 @@ const MessageInput: FC<OwnProps & StateProps & DispatchProps> = ({
|
||||
return;
|
||||
}
|
||||
|
||||
if (shouldSetFocus) {
|
||||
focusInput();
|
||||
}
|
||||
}, [currentChatId, focusInput, replyingToId, shouldSetFocus]);
|
||||
|
||||
useEffect(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user