PLT-6211: Close emoji picker right away after react (#6275)
Close emoji picker before adding emoji to recent used.
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
030b9a0c5c
Коммит
ad7f8eda7e
@@ -318,10 +318,9 @@ export default class PostInfo extends React.Component {
|
|||||||
|
|
||||||
reactEmojiClick(emoji) {
|
reactEmojiClick(emoji) {
|
||||||
const pickerOffset = 21;
|
const pickerOffset = 21;
|
||||||
|
this.setState({showEmojiPicker: false, reactionPickerOffset: pickerOffset});
|
||||||
const emojiName = emoji.name || emoji.aliases[0];
|
const emojiName = emoji.name || emoji.aliases[0];
|
||||||
PostActions.addReaction(this.props.post.channel_id, this.props.post.id, emojiName);
|
PostActions.addReaction(this.props.post.channel_id, this.props.post.id, emojiName);
|
||||||
this.setState({showEmojiPicker: false, reactionPickerOffset: pickerOffset});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@@ -374,7 +373,7 @@ export default class PostInfo extends React.Component {
|
|||||||
container={this}
|
container={this}
|
||||||
onHide={() => this.setState({showEmojiPicker: false})}
|
onHide={() => this.setState({showEmojiPicker: false})}
|
||||||
target={() => ReactDOM.findDOMNode(this.refs['reactIcon_' + post.id])}
|
target={() => ReactDOM.findDOMNode(this.refs['reactIcon_' + post.id])}
|
||||||
|
animation={false}
|
||||||
>
|
>
|
||||||
<EmojiPicker
|
<EmojiPicker
|
||||||
onEmojiClick={this.reactEmojiClick}
|
onEmojiClick={this.reactEmojiClick}
|
||||||
|
|||||||
@@ -597,7 +597,7 @@ export default class RhsComment extends React.Component {
|
|||||||
container={this.refs['post_body_' + post.id]}
|
container={this.refs['post_body_' + post.id]}
|
||||||
onHide={() => this.setState({showReactEmojiPicker: false})}
|
onHide={() => this.setState({showReactEmojiPicker: false})}
|
||||||
target={() => ReactDOM.findDOMNode(this.refs['rhs_reacticon_' + post.id])}
|
target={() => ReactDOM.findDOMNode(this.refs['rhs_reacticon_' + post.id])}
|
||||||
|
animation={false}
|
||||||
>
|
>
|
||||||
<EmojiPicker
|
<EmojiPicker
|
||||||
onEmojiClick={this.reactEmojiClick}
|
onEmojiClick={this.reactEmojiClick}
|
||||||
|
|||||||
@@ -171,9 +171,9 @@ export default class RhsRootPost extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
reactEmojiClick(emoji) {
|
reactEmojiClick(emoji) {
|
||||||
|
this.setState({showRHSEmojiPicker: false});
|
||||||
const emojiName = emoji.name || emoji.aliases[0];
|
const emojiName = emoji.name || emoji.aliases[0];
|
||||||
addReaction(this.props.post.channel_id, this.props.post.id, emojiName);
|
addReaction(this.props.post.channel_id, this.props.post.id, emojiName);
|
||||||
this.setState({showRHSEmojiPicker: false});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@@ -245,7 +245,7 @@ export default class RhsRootPost extends React.Component {
|
|||||||
container={this}
|
container={this}
|
||||||
onHide={() => this.setState({showRHSEmojiPicker: false})}
|
onHide={() => this.setState({showRHSEmojiPicker: false})}
|
||||||
target={() => ReactDOM.findDOMNode(this.refs.rhs_root_reacticon)}
|
target={() => ReactDOM.findDOMNode(this.refs.rhs_root_reacticon)}
|
||||||
|
animation={false}
|
||||||
>
|
>
|
||||||
<EmojiPicker
|
<EmojiPicker
|
||||||
onEmojiClick={this.reactEmojiClick}
|
onEmojiClick={this.reactEmojiClick}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user