summaryrefslogtreecommitdiffstats
path: root/web/react/components/create_post.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/create_post.jsx')
-rw-r--r--web/react/components/create_post.jsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx
index ce4ebac9e..8af9c36b3 100644
--- a/web/react/components/create_post.jsx
+++ b/web/react/components/create_post.jsx
@@ -117,7 +117,6 @@ export default class CreatePost extends React.Component {
Client.createPost(post, channel,
function handlePostSuccess(data) {
- this.resizePostHolder();
AsyncClient.getPosts();
let member = ChannelStore.getMember(channel.id);
@@ -129,7 +128,7 @@ export default class CreatePost extends React.Component {
type: ActionTypes.RECIEVED_POST,
post: data
});
- }.bind(this),
+ },
function handlePostError(err) {
let state = {};
@@ -149,9 +148,6 @@ export default class CreatePost extends React.Component {
);
}
}
- componentDidUpdate() {
- this.resizePostHolder();
- }
postMsgKeyPress(e) {
if (e.which === 13 && !e.shiftKey && !e.altKey) {
e.preventDefault();
@@ -166,7 +162,6 @@ export default class CreatePost extends React.Component {
}
}
handleUserInput(messageText) {
- this.resizePostHolder();
this.setState({messageText: messageText});
let draft = PostStore.getCurrentDraft();
@@ -317,6 +312,7 @@ export default class CreatePost extends React.Component {
<Textbox
onUserInput={this.handleUserInput}
onKeyPress={this.postMsgKeyPress}
+ onHeightChange={this.resizePostHolder}
messageText={this.state.messageText}
createMessage='Write a message...'
channelId={this.state.channelId}