Files
zulip/static/js
Steve Howell c11de1e3a7 user profile cards: Fix bug with deactivated user.
We had a user have problems with the user
profile menus that you get when you click
on either sender avatars or mention pills.

If a deactivated user had a long enough email
that we would normally want to un-hide the clipboard
icon for them, we would crash inside of
`init_email_clipboard`, because the icon isn't
there for them.  If the user didn't have the
console open to see the crash, the symptom
became that you would get multiple cards
visible and kind of "stuck".

I chose to fix this by just making the code
defensive with respect to the absence of the
icon, instead of short-circuiting it for
deactivated users.

It's a bit odd that we still have an element
matching `.user_email_popover` in the profile
card for deactivated users, since that element
doesn't actually include an email, but it instead
says "(This user has been deactivated)".  I
considered removing the class, but the CSS
that we use for emails kind of applies here
too.

Testing this is a kind of a pain, as you want
either long emails or to just temporarily hack
this condition to true:

    if (this.clientWidth < this.scrollWidth) {
        // ...
    }

And then test with a deactivated user, of course.

Fixes #14473
2020-04-26 11:12:45 -07:00
..
2020-03-02 17:45:44 -08:00
2020-02-25 15:37:37 -08:00
2020-03-24 20:40:19 -07:00
2020-02-04 12:22:03 -08:00
2019-10-25 13:51:21 -07:00
2020-02-25 15:37:37 -08:00
2020-03-26 21:35:32 -07:00
2020-02-10 15:57:20 -08:00
2020-02-25 15:37:37 -08:00
2020-02-15 12:20:20 -08:00
2019-10-25 13:51:21 -07:00
2020-02-25 15:37:37 -08:00