diff --git a/web/src/user_group_popover.ts b/web/src/user_group_popover.ts index 7006480ca4..709e4f8599 100644 --- a/web/src/user_group_popover.ts +++ b/web/src/user_group_popover.ts @@ -143,6 +143,13 @@ export function register_click_handlers(): void { toggle_user_group_info_popover(this, undefined); }, ); + + // Note: Message feeds and drafts have their own direct event listeners + // that run before this one and call stopPropagation. + $("body").on("click", ".messagebox .user-group-mention", function (this: HTMLElement, e) { + e.stopPropagation(); + toggle_user_group_info_popover(this, undefined); + }); } function fetch_group_members(member_ids: number[]): PopoverGroupMember[] { diff --git a/web/styles/rendered_markdown.css b/web/styles/rendered_markdown.css index c6b2e97c69..e4fda2cce4 100644 --- a/web/styles/rendered_markdown.css +++ b/web/styles/rendered_markdown.css @@ -173,9 +173,6 @@ } .user-mention { - /* We have to explicitly mention this for compose box preview - where cursor is set to not-allowed */ - cursor: pointer; color: var(--color-text-other-mention); background-color: var(--color-background-text-direct-mention); @@ -189,6 +186,13 @@ } } + .user-mention, + .user-group-mention { + /* We have to explicitly mention this for compose box preview + where cursor is set to not-allowed */ + cursor: pointer; + } + /* We show the same cursor as the parent element for `@all` mention */ .user-mention-all {