|
|
@ -28,10 +28,6 @@ const messages = defineMessages({ |
|
|
|
export default @injectIntl |
|
|
|
export default @injectIntl |
|
|
|
class ComposeForm extends ImmutablePureComponent { |
|
|
|
class ComposeForm extends ImmutablePureComponent { |
|
|
|
|
|
|
|
|
|
|
|
setRef = c => { |
|
|
|
|
|
|
|
this.composeForm = c; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static contextTypes = { |
|
|
|
static contextTypes = { |
|
|
|
router: PropTypes.object, |
|
|
|
router: PropTypes.object, |
|
|
|
}; |
|
|
|
}; |
|
|
@ -145,6 +141,10 @@ class ComposeForm extends ImmutablePureComponent { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setRef = c => { |
|
|
|
|
|
|
|
this.composeForm = c; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// Inserts an emoji at the caret.
|
|
|
|
// Inserts an emoji at the caret.
|
|
|
|
handleEmoji = (data) => { |
|
|
|
handleEmoji = (data) => { |
|
|
|
const { textarea: { selectionStart } } = this; |
|
|
|
const { textarea: { selectionStart } } = this; |
|
|
@ -213,8 +213,10 @@ class ComposeForm extends ImmutablePureComponent { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
handleFocus = () => { |
|
|
|
handleFocus = () => { |
|
|
|
|
|
|
|
if (this.composeForm) { |
|
|
|
this.composeForm.scrollIntoView(); |
|
|
|
this.composeForm.scrollIntoView(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// This statement does several things:
|
|
|
|
// This statement does several things:
|
|
|
|
// - If we're beginning a reply, and,
|
|
|
|
// - If we're beginning a reply, and,
|
|
|
|