summaryrefslogtreecommitdiffstats
path: root/webapp/components/rhs_comment.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/rhs_comment.jsx')
-rw-r--r--webapp/components/rhs_comment.jsx23
1 files changed, 21 insertions, 2 deletions
diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx
index 85c2fc1de..b7e82d903 100644
--- a/webapp/components/rhs_comment.jsx
+++ b/webapp/components/rhs_comment.jsx
@@ -46,6 +46,7 @@ export default class RhsComment extends React.Component {
this.unpinPost = this.unpinPost.bind(this);
this.reactEmojiClick = this.reactEmojiClick.bind(this);
this.emojiPickerClick = this.emojiPickerClick.bind(this);
+ this.handleDropdownOpened = this.handleDropdownOpened.bind(this);
this.canEdit = false;
this.canDelete = false;
@@ -56,7 +57,8 @@ export default class RhsComment extends React.Component {
width: '',
height: '',
showReactEmojiPicker: false,
- reactPickerOffset: 15
+ reactPickerOffset: 15,
+ dropdownOpened: false
};
}
@@ -135,6 +137,10 @@ export default class RhsComment extends React.Component {
return true;
}
+ if (this.state.dropdownOpened !== nextState.dropdownOpened) {
+ return true;
+ }
+
return false;
}
@@ -318,7 +324,10 @@ export default class RhsComment extends React.Component {
}
return (
- <RhsDropdown dropdownContents={dropdownContents}/>
+ <RhsDropdown
+ dropdownContents={dropdownContents}
+ handleDropdownOpened={this.handleDropdownOpened}
+ />
);
}
@@ -386,9 +395,19 @@ export default class RhsComment extends React.Component {
className += ' post--pinned';
}
+ if (this.state.dropdownOpened) {
+ className += ' post--hovered';
+ }
+
return className;
}
+ handleDropdownOpened(isOpened) {
+ this.setState({
+ dropdownOpened: isOpened
+ });
+ }
+
render() {
const post = this.props.post;
const mattermostLogo = Constants.MATTERMOST_ICON_SVG;