fix replying to message focus composition box

Relates #1808
This commit is contained in:
Audric Ackermann 2021-07-30 08:55:46 +10:00
parent 6bf95a47e3
commit 61277a5397
No known key found for this signature in database
GPG key ID: 999F434D76324AD4
2 changed files with 6 additions and 2 deletions

View file

@ -179,6 +179,11 @@ class SessionCompositionBoxInner extends React.Component<Props, State> {
// if number of staged attachment changed, focus the composition box for a more natural UI
this.focusCompositionBox();
}
// focus the composition box when user clicks start to reply to a message
if (!_.isEqual(prevProps.quotedMessageProps, this.props.quotedMessageProps)) {
this.focusCompositionBox();
}
}
public render() {

View file

@ -41,10 +41,9 @@ import {
import { getDecryptedMediaUrl } from '../session/crypto/DecryptedAttachmentsManager';
import { IMAGE_JPEG } from '../types/MIME';
import { FSv2 } from '../fileserver';
import { fromBase64ToArray, fromHexToArray, toHex } from '../session/utils/String';
import { fromHexToArray, toHex } from '../session/utils/String';
import { SessionButtonColor } from '../components/session/SessionButton';
import { perfEnd, perfStart } from '../session/utils/Performance';
import { ReplyingToMessageProps } from '../components/session/conversation/SessionCompositionBox';
export const getCompleteUrlForV2ConvoId = async (convoId: string) => {
if (convoId.match(openGroupV2ConversationIdRegex)) {