summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeraLyu <lvroyce0210@gmail.com>2017-05-03 23:51:33 +0800
committerCorey Hulen <corey@hulen.com>2017-05-03 08:51:33 -0700
commitad7f8eda7e32d4b1a3578db80bfc2728332f6fbb (patch)
tree74a4937c3c906a4e3e4387596336e105c014a106
parent030b9a0c5c3ee1f17765fff1a85fb30e378db310 (diff)
downloadchat-ad7f8eda7e32d4b1a3578db80bfc2728332f6fbb.tar.gz
chat-ad7f8eda7e32d4b1a3578db80bfc2728332f6fbb.tar.bz2
chat-ad7f8eda7e32d4b1a3578db80bfc2728332f6fbb.zip
PLT-6211: Close emoji picker right away after react (#6275)
Close emoji picker before adding emoji to recent used.
-rw-r--r--webapp/components/post_view/components/post_info.jsx5
-rw-r--r--webapp/components/rhs_comment.jsx2
-rw-r--r--webapp/components/rhs_root_post.jsx4
3 files changed, 5 insertions, 6 deletions
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}
>
<EmojiPicker
onEmojiClick={this.reactEmojiClick}
diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx
index 10cd5fb55..e7d55813d 100644
--- a/webapp/components/rhs_comment.jsx
+++ b/webapp/components/rhs_comment.jsx
@@ -597,7 +597,7 @@ export default class RhsComment extends React.Component {
container={this.refs['post_body_' + post.id]}
onHide={() => this.setState({showReactEmojiPicker: false})}
target={() => ReactDOM.findDOMNode(this.refs['rhs_reacticon_' + post.id])}
-
+ animation={false}
>
<EmojiPicker
onEmojiClick={this.reactEmojiClick}
diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx
index 41dd92e91..023387bb4 100644
--- a/webapp/components/rhs_root_post.jsx
+++ b/webapp/components/rhs_root_post.jsx
@@ -171,9 +171,9 @@ export default class RhsRootPost extends React.Component {
}
reactEmojiClick(emoji) {
+ this.setState({showRHSEmojiPicker: false});
const emojiName = emoji.name || emoji.aliases[0];
addReaction(this.props.post.channel_id, this.props.post.id, emojiName);
- this.setState({showRHSEmojiPicker: false});
}
render() {
@@ -245,7 +245,7 @@ export default class RhsRootPost extends React.Component {
container={this}
onHide={() => this.setState({showRHSEmojiPicker: false})}
target={() => ReactDOM.findDOMNode(this.refs.rhs_root_reacticon)}
-
+ animation={false}
>
<EmojiPicker
onEmojiClick={this.reactEmojiClick}