zulip/static
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
..
assets python: Convert more percent formatting to Python 3.6 f-strings. 2020-06-14 23:27:22 -07:00
audio notifications: Add a setting for changing the notification sound. 2018-12-09 21:25:30 -08:00
generated
html docs: Update URLs to use https://zulip.com. 2020-06-08 18:10:45 -07:00
images apple_auth: Add icon for log in and sign up buttons. 2020-06-19 12:55:24 -07:00
js stream edit: Add <Enter> keyboard shortcut to invite users to stream. 2020-06-21 09:57:00 -07:00
shared typeahead: Convert to ES6 module. 2020-02-19 14:36:42 -08:00
styles message_controls: Prevent clicks via visibility & not pointer-events. 2020-06-21 10:12:41 -07:00
templates recent_topics: Move "Include muted" filter beside "All" filter. 2020-06-21 10:03:26 -07:00
third typeahead: Prevent lookup on backspace keyup event on searchbox. 2020-06-19 16:18:52 -07:00
.eslintrc.json lint: Delegate console.log check to ESLint. 2020-02-07 14:09:47 -08:00
.gitignore team: Generate team page data using cron job. 2020-04-08 12:52:31 -07:00
favicon.ico