Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

message_controls: Prevent clicks via visibility & not pointer-events.

YashRE42a4f5b0c635fc
diff --git a/static/styles/zulip.scss b/static/styles/zulip.scss
index f20a5ff862b..0d8b65d435c 100644
--- a/static/styles/zulip.scss
+++ b/static/styles/zulip.scss
@@ -678,9 +678,14 @@ td.pointer {
right: -56px;
z-index: 1;
+ // This is a bit tricky; we need to reserve space for the message
+ // controls even when the message isn't hovered, so that hover
+ // doesn't disturb the layout. Usually that would be just
+ // visibility: hidden, but that cannot be animated, so we set
+ // opacity as well, which can be animated.
> div {
opacity: 0;
- pointer-events: none;
+ visibility: hidden;
transition: all 0.2s ease;
padding: 0px 1px;
}
@@ -752,7 +757,7 @@ td.pointer {
> div {
opacity: 1;
- pointer-events: all;
+ visibility: visible;
}
}
@@ -1150,6 +1155,7 @@ td.pointer {
.has_actions_popover .info {
opacity: 1;
+ visibility: visible;
}
/* Brighten text because of the dark background */