|
@ -55,6 +55,7 @@ class ComposeForm extends ImmutablePureComponent { |
|
|
onPickEmoji: PropTypes.func, |
|
|
onPickEmoji: PropTypes.func, |
|
|
showSearch: PropTypes.bool, |
|
|
showSearch: PropTypes.bool, |
|
|
anyMedia: PropTypes.bool, |
|
|
anyMedia: PropTypes.bool, |
|
|
|
|
|
singleColumn: PropTypes.bool, |
|
|
|
|
|
|
|
|
advancedOptions: ImmutablePropTypes.map, |
|
|
advancedOptions: ImmutablePropTypes.map, |
|
|
layout: PropTypes.string, |
|
|
layout: PropTypes.string, |
|
@ -195,7 +196,7 @@ class ComposeForm extends ImmutablePureComponent { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
handleFocus = () => { |
|
|
handleFocus = () => { |
|
|
if (this.composeForm) { |
|
|
|
|
|
|
|
|
if (this.composeForm && !this.props.singleColumn) { |
|
|
this.composeForm.scrollIntoView(); |
|
|
this.composeForm.scrollIntoView(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -219,6 +220,7 @@ class ComposeForm extends ImmutablePureComponent { |
|
|
preselectDate, |
|
|
preselectDate, |
|
|
text, |
|
|
text, |
|
|
preselectOnReply, |
|
|
preselectOnReply, |
|
|
|
|
|
singleColumn, |
|
|
} = this.props; |
|
|
} = this.props; |
|
|
let selectionEnd, selectionStart; |
|
|
let selectionEnd, selectionStart; |
|
|
|
|
|
|
|
@ -238,7 +240,7 @@ class ComposeForm extends ImmutablePureComponent { |
|
|
if (textarea) { |
|
|
if (textarea) { |
|
|
textarea.setSelectionRange(selectionStart, selectionEnd); |
|
|
textarea.setSelectionRange(selectionStart, selectionEnd); |
|
|
textarea.focus(); |
|
|
textarea.focus(); |
|
|
textarea.scrollIntoView(); |
|
|
|
|
|
|
|
|
if (!singleColumn) textarea.scrollIntoView(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Refocuses the textarea after submitting.
|
|
|
// Refocuses the textarea after submitting.
|
|
|