Hide tooltip when badge clicked and collapsed

pull/21833/head
wmwragg 2016-07-29 11:10:16 +01:00
parent 5889beacf3
commit 38f504bdcb
1 changed files with 6 additions and 0 deletions

View File

@ -111,6 +111,12 @@ module.exports = React.createClass({
onBadgeClicked: function(e) { onBadgeClicked: function(e) {
// Only allow none guests to access the context menu // Only allow none guests to access the context menu
if (!MatrixClientPeg.get().isGuest()) { if (!MatrixClientPeg.get().isGuest()) {
// If the badge is clicked, then no longer show tooltip
if (this.props.collapsed) {
this.setState({ hover: false });
}
var Menu = sdk.getComponent('context_menus.NotificationStateContextMenu'); var Menu = sdk.getComponent('context_menus.NotificationStateContextMenu');
var elementRect = e.target.getBoundingClientRect(); var elementRect = e.target.getBoundingClientRect();
// The window X and Y offsets are to adjust position when zoomed in to page // The window X and Y offsets are to adjust position when zoomed in to page