summaryrefslogtreecommitdiffstats
path: root/web/react/components/create_comment.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-09-25 12:06:43 -0400
committerJoramWilander <jwawilander@gmail.com>2015-09-25 12:06:43 -0400
commit06a7c5e5d72cac9abf07f4204bb94595fa7a9626 (patch)
treeb22c013744469e5657124ef7b8be191ae8b69e69 /web/react/components/create_comment.jsx
parente743ad483aed6c730bb8636bb089a6ef8d8d0097 (diff)
downloadchat-06a7c5e5d72cac9abf07f4204bb94595fa7a9626.tar.gz
chat-06a7c5e5d72cac9abf07f4204bb94595fa7a9626.tar.bz2
chat-06a7c5e5d72cac9abf07f4204bb94595fa7a9626.zip
Fixes RHS not scrolling to show previews when file attached.
Diffstat (limited to 'web/react/components/create_comment.jsx')
-rw-r--r--web/react/components/create_comment.jsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/react/components/create_comment.jsx b/web/react/components/create_comment.jsx
index 99f553c0c..5097b3aa5 100644
--- a/web/react/components/create_comment.jsx
+++ b/web/react/components/create_comment.jsx
@@ -43,6 +43,12 @@ export default class CreateComment extends React.Component {
submitting: false
};
}
+ componentDidUpdate(prevProps, prevState) {
+ if (prevState.uploadsInProgress < this.state.uploadsInProgress) {
+ $('.post-right__scroll').scrollTop($('.post-right__scroll')[0].scrollHeight);
+ $('.post-right__scroll').perfectScrollbar('update');
+ }
+ }
handleSubmit(e) {
e.preventDefault();