diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-09-03 15:30:58 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-09-03 15:30:58 -0400 |
commit | 9424fa92ab2bf404c600020d6b2428023b92bcc5 (patch) | |
tree | f670cafccd95fb011e17e1a1c1fce8db9fc8faa1 /web/react/components/create_post.jsx | |
parent | 2a62b00d76f4de921fbebc321f0c0debd30d41d6 (diff) | |
parent | e4336bbc84d00b3665b5f55e0220a67af030e33d (diff) | |
download | chat-9424fa92ab2bf404c600020d6b2428023b92bcc5.tar.gz chat-9424fa92ab2bf404c600020d6b2428023b92bcc5.tar.bz2 chat-9424fa92ab2bf404c600020d6b2428023b92bcc5.zip |
Merge pull request #585 from mattermost/plt-37
PLT-37 Fix poor typing performance on iOS devices.
Diffstat (limited to 'web/react/components/create_post.jsx')
-rw-r--r-- | web/react/components/create_post.jsx | 8 |
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} |