mirror of https://github.com/zulip/zulip.git
popovers: Fix 'u' keyboard shortcut on messages without avatars.
In ab0c5f3092
, it was missed that this
code depended on the sender_info_hover CSS class, which is no longer
an empty element on messages without a message sender avatar/name
element.
The logic is still hacky, as it relies on the position of an invisible
element, but we're rewriting the positioning logic using Tippy anyway,
so it's not worth doing much to make it nicer.
Fixes #25496.
This commit is contained in:
parent
3cc3fbc0c3
commit
f6dde97ec9
|
@ -670,7 +670,12 @@ export function user_info_popover_manage_menu_handle_keyboard(key) {
|
|||
|
||||
export function show_sender_info() {
|
||||
const $message = $(".selected_message");
|
||||
const $sender = $message.find(".sender_info_hover");
|
||||
let $sender = $message.find(".inline_profile_picture");
|
||||
if ($sender.length === 0) {
|
||||
// Messages without an avatar have an invisible message_sender
|
||||
// element that's roughly in the right place.
|
||||
$sender = $message.find(".message_sender");
|
||||
}
|
||||
|
||||
const message = message_lists.current.get(rows.id($message));
|
||||
const user = people.get_by_user_id(message.sender_id);
|
||||
|
|
Loading…
Reference in New Issue