|
|
|
@ -60,6 +60,7 @@ class ComposeForm extends ImmutablePureComponent {
|
|
|
|
|
onPickEmoji: PropTypes.func.isRequired,
|
|
|
|
|
showSearch: PropTypes.bool,
|
|
|
|
|
anyMedia: PropTypes.bool,
|
|
|
|
|
isInReply: PropTypes.bool,
|
|
|
|
|
singleColumn: PropTypes.bool,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -149,7 +150,7 @@ class ComposeForm extends ImmutablePureComponent {
|
|
|
|
|
if (this.props.focusDate !== prevProps.focusDate) {
|
|
|
|
|
let selectionEnd, selectionStart;
|
|
|
|
|
|
|
|
|
|
if (this.props.preselectDate !== prevProps.preselectDate) {
|
|
|
|
|
if (this.props.preselectDate !== prevProps.preselectDate && this.props.isInReply) {
|
|
|
|
|
selectionEnd = this.props.text.length;
|
|
|
|
|
selectionStart = this.props.text.search(/\s/) + 1;
|
|
|
|
|
} else if (typeof this.props.caretPosition === 'number') {
|
|
|
|
|