mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-22 06:51:21 +02:00
Hide tooltip when badge clicked and collapsed
This commit is contained in:
parent
5889beacf3
commit
38f504bdcb
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user