diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-05-03 03:08:21 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-02 20:08:21 +0200 |
commit | 46943b64c6b8be3c592f2496744cfb028f09bded (patch) | |
tree | b1abf68cf3cc8c03b86e85a036ced96a634e3596 /app/assets/javascripts/components/features | |
parent | 302c0d2046724000eea554970e30f9f27112649b (diff) |
Reset textarea height when press submit key (#2681)
* Reset textarea height when press submit key * dry * DON'T NEED props
Diffstat (limited to 'app/assets/javascripts/components/features')
-rw-r--r-- | app/assets/javascripts/components/features/compose/components/compose_form.jsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/components/features/compose/components/compose_form.jsx b/app/assets/javascripts/components/features/compose/components/compose_form.jsx index 7955aaba9..6bc811160 100644 --- a/app/assets/javascripts/components/features/compose/components/compose_form.jsx +++ b/app/assets/javascripts/components/features/compose/components/compose_form.jsx @@ -44,12 +44,12 @@ class ComposeForm extends React.PureComponent { handleKeyDown (e) { if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) { - this.props.onSubmit(); + this.handleSubmit(); } } handleSubmit () { - this.autosuggestTextarea.textarea.style.height = "auto"; + this.autosuggestTextarea.reset(); this.props.onSubmit(); } |