mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
user_card_popover: Focus on menu options when opened with keyboard.
When the user card is opened via the keyboard shortcut `U`, the initial focus should be on the first popover menu option, rather than the copy buttons or the custom profile field links which can be distracting due to the presence of tooltips on them. Fixes part of #31027.
This commit is contained in:
@@ -480,7 +480,9 @@ function get_user_card_popover_for_message_items() {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return $("li:not(.divider):visible a:not(.hide_copy_icon)", $popover);
|
||||
// Return only the popover menu options that are visible, and not the
|
||||
// copy buttons or the link items in the custom profile fields.
|
||||
return $(".link-item .popover-menu-link", $popover).filter(":visible");
|
||||
}
|
||||
|
||||
// Functions related to the user card popover in the user sidebar.
|
||||
|
||||
Reference in New Issue
Block a user