|
|
|
@ -33,10 +33,6 @@ const messages = defineMessages({ |
|
|
|
|
export default @injectIntl |
|
|
|
|
class ComposeForm extends ImmutablePureComponent { |
|
|
|
|
|
|
|
|
|
setRef = c => { |
|
|
|
|
this.composeForm = c; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
static contextTypes = { |
|
|
|
|
router: PropTypes.object, |
|
|
|
|
}; |
|
|
|
@ -119,8 +115,10 @@ class ComposeForm extends ImmutablePureComponent { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
handleFocus = () => { |
|
|
|
|
if (this.composeForm) { |
|
|
|
|
this.composeForm.scrollIntoView(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
componentDidUpdate (prevProps) { |
|
|
|
|
// This statement does several things:
|
|
|
|
@ -163,6 +161,10 @@ class ComposeForm extends ImmutablePureComponent { |
|
|
|
|
this.spoilerText = c; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setRef = c => { |
|
|
|
|
this.composeForm = c; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
handleEmojiPick = (data) => { |
|
|
|
|
const { text } = this.props; |
|
|
|
|
const position = this.autosuggestTextarea.textarea.selectionStart; |
|
|
|
|