From ad7f8eda7e32d4b1a3578db80bfc2728332f6fbb Mon Sep 17 00:00:00 2001 From: VeraLyu Date: Wed, 3 May 2017 23:51:33 +0800 Subject: PLT-6211: Close emoji picker right away after react (#6275) Close emoji picker before adding emoji to recent used. --- webapp/components/post_view/components/post_info.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'webapp/components/post_view') diff --git a/webapp/components/post_view/components/post_info.jsx b/webapp/components/post_view/components/post_info.jsx index e7cb9ffb0..0cb8ff5ac 100644 --- a/webapp/components/post_view/components/post_info.jsx +++ b/webapp/components/post_view/components/post_info.jsx @@ -318,10 +318,9 @@ export default class PostInfo extends React.Component { reactEmojiClick(emoji) { const pickerOffset = 21; - + this.setState({showEmojiPicker: false, reactionPickerOffset: pickerOffset}); const emojiName = emoji.name || emoji.aliases[0]; PostActions.addReaction(this.props.post.channel_id, this.props.post.id, emojiName); - this.setState({showEmojiPicker: false, reactionPickerOffset: pickerOffset}); } render() { @@ -374,7 +373,7 @@ export default class PostInfo extends React.Component { container={this} onHide={() => this.setState({showEmojiPicker: false})} target={() => ReactDOM.findDOMNode(this.refs['reactIcon_' + post.id])} - + animation={false} >