|
|
@ -75,8 +75,10 @@ export class SessionCompositionBox extends React.Component<Props, State> {
|
|
|
|
this.onChoseAttachment = this.onChoseAttachment.bind(this);
|
|
|
|
this.onChoseAttachment = this.onChoseAttachment.bind(this);
|
|
|
|
this.onChooseAttachment = this.onChooseAttachment.bind(this);
|
|
|
|
this.onChooseAttachment = this.onChooseAttachment.bind(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Events
|
|
|
|
this.onKeyDown = this.onKeyDown.bind(this);
|
|
|
|
this.onKeyDown = this.onKeyDown.bind(this);
|
|
|
|
this.onChange = this.onChange.bind(this);
|
|
|
|
this.onChange = this.onChange.bind(this);
|
|
|
|
|
|
|
|
this.onTextareaContainerClick = this.onTextareaContainerClick.bind(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public componentWillReceiveProps() {
|
|
|
|
public componentWillReceiveProps() {
|
|
|
@ -171,11 +173,11 @@ export class SessionCompositionBox extends React.Component<Props, State> {
|
|
|
|
onClick={this.onLoadVoiceNoteView}
|
|
|
|
onClick={this.onLoadVoiceNoteView}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<div className="send-message-input">
|
|
|
|
<div className="send-message-input" role="main" onClick={this.onTextareaContainerClick}>
|
|
|
|
<TextareaAutosize
|
|
|
|
<TextareaAutosize
|
|
|
|
rows={1}
|
|
|
|
rows={1}
|
|
|
|
maxRows={3}
|
|
|
|
maxRows={3}
|
|
|
|
ref={this.textarea}
|
|
|
|
spellCheck={false}
|
|
|
|
placeholder={placeholder}
|
|
|
|
placeholder={placeholder}
|
|
|
|
maxLength={Constants.CONVERSATION.MAX_MESSAGE_BODY_LENGTH}
|
|
|
|
maxLength={Constants.CONVERSATION.MAX_MESSAGE_BODY_LENGTH}
|
|
|
|
onKeyDown={this.onKeyDown}
|
|
|
|
onKeyDown={this.onKeyDown}
|
|
|
@ -402,4 +404,9 @@ export class SessionCompositionBox extends React.Component<Props, State> {
|
|
|
|
}, 20);
|
|
|
|
}, 20);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private onTextareaContainerClick() {
|
|
|
|
|
|
|
|
// Focus textarea when user clicks anywhere in the container
|
|
|
|
|
|
|
|
this.textarea.current?.focus();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|