zulip/static/styles
YashRE42 a4f5b0c635 message_controls: Prevent clicks via visibility & not pointer-events.
Previously, the message controls had a bug where they would trigger on
mobile with a single tap over the area they occupy when visible. This
is wrong because a user would expect to first see the controls and
only trigger them once they are visible (with a second tap).

The above bug is caused by the fact that we were using "opacity: 0" on
".message_controls > div" to hide the controls and "opacity: 1" on
".messagebox &:hover .message_controls > div" to show the controls on
hover, however, this would not effect the click action because
"opacity". So we used "pointer-events: none;" and "pointer-events:
all;" with the hopes that it would prevented the above bug, but in
practice, it didn't.
(the most probable explanation being that tapping the message_control
area would cause the "&:hover" rule to trigger and change the
"pointer-event" to "all" before it could prevent the click trigger,
But that explanation is just conjecture.)

This commit replaces both "pointer-events" attributes with
"visibility: hidden" and "visibility: visible" respectively. The
result being that the message_controls behave identically to before,
except without the above bug.

The addition to the ".has_actions_popover .info" selector is important
because without it, we would regress on issue #3172.

Trivia:
An alternate approach to using "opacity" is to set the
"display" attribute to "none", however, using "display" prevents the
transition from animating (which is probably why we were using opacity
here in the first place). "visibility" does not prevent the transition
from animating.

History: The "pointer-events" attribute was introduced in
4d5aa3ddc9 and it replaced prior code
which relied on the "visibility" attribute... But it seems PR #3792
was mostly focused on improving the positioning through removal of
`display: none`, but introduced opacity to make the animations work
rather than visibility as the replacement solution, which requires the
pointer-events hack and resulted in the bug described here.

Fixes the second bug described in #13642.
2020-06-21 10:12:41 -07:00
..
portico portico: Fix UI of /accounts/go page. 2020-06-20 17:54:06 -07:00
alerts.scss bankruptcy: Migrate from modal view to top-of-page panel. 2020-03-31 15:30:37 -07:00
app_components.scss css: Move css of upgrade-tip class to app_components.scss. 2020-06-18 01:17:58 -07:00
components.scss css: Extract styling for .zulip-icon.bot. 2020-05-20 11:22:06 -07:00
compose.scss stream_header_colorblock: Create resuable css class. 2020-06-13 15:38:40 -07:00
drafts.scss styles: Replace Sass with PostCSS. 2019-08-29 16:35:51 -07:00
hotspots.scss hotspots: Animate more tastefully. 2020-02-25 14:04:11 -08:00
informational-overlays.scss styles: Remove most vendor-prefixed CSS attributes. 2019-08-30 14:51:52 -07:00
input_pill.scss stream settings: Add pills in add subscribers input. 2020-06-02 15:32:26 -07:00
left-sidebar.scss left-sidebar: Update comment. 2020-06-18 00:54:18 -07:00
lightbox.scss styles: Remove most vendor-prefixed CSS attributes. 2019-08-30 14:51:52 -07:00
message_edit_history.scss edit_history: Highlight topic edit diffs by using correct CSS selector. 2020-06-07 13:57:28 -07:00
night_mode.scss settings: Add automatic theme detection feature. 2020-06-21 01:09:01 -07:00
popovers.scss user-profile: Change color of `name` field. 2020-06-20 23:32:49 -07:00
pygments.scss styles: Finish removing manual antialiasing configuration. 2019-08-30 14:51:52 -07:00
reactions.scss styles: Remove most vendor-prefixed CSS attributes. 2019-08-30 14:51:52 -07:00
recent_topics.scss recent_topics: Show unread counts similar to other UI elements. 2020-06-13 16:29:19 -07:00
rendered_markdown.scss markdown: Use html5 <time> tag for timestamps. 2020-06-18 14:11:33 -07:00
right-sidebar.scss sidebars: Replace chevron with ellipsis-v icon from the sidebars. 2020-06-14 20:57:43 -07:00
settings.scss settings CSS : Fix 'user-avatar-source' text reflow bug. 2020-06-19 15:53:51 -07:00
subscriptions.scss streams: Add frontend to set/update message_retention_days of a stream. 2020-06-18 17:00:34 -07:00
typing_notifications.scss styles: Move media queries into the files they override. 2019-10-28 15:39:17 -07:00
user_circles.scss styles: Remove most vendor-prefixed CSS attributes. 2019-08-30 14:51:52 -07:00
user_status.scss styles: Remove stray semicolon from input.user_status block. 2019-09-02 21:45:43 -07:00
widgets.scss todo_list: Add task description and index numbers. 2020-03-12 08:02:06 -04:00
zulip.scss message_controls: Prevent clicks via visibility & not pointer-events. 2020-06-21 10:12:41 -07:00