diff --git a/web/src/click_handlers.ts b/web/src/click_handlers.ts index b08ef36a9a..2c8e826af7 100644 --- a/web/src/click_handlers.ts +++ b/web/src/click_handlers.ts @@ -462,6 +462,12 @@ export function initialize(): void { if ($(e.target).parents(".user-profile-picture").length === 1) { return; } + if (document.getSelection()?.type === "Range") { + // To avoid the click behavior if a user name or status text is + // selected. + e.preventDefault(); + return; + } const $li = $(e.target).parents("li"); diff --git a/web/styles/right_sidebar.css b/web/styles/right_sidebar.css index cd00c46779..d30d3d88fb 100644 --- a/web/styles/right_sidebar.css +++ b/web/styles/right_sidebar.css @@ -356,6 +356,7 @@ } .user-presence-link { + user-select: text; grid-area: row-content; &:hover, diff --git a/web/templates/presence_row.hbs b/web/templates/presence_row.hbs index 2d4ed1a950..908d623ba1 100644 --- a/web/templates/presence_row.hbs +++ b/web/templates/presence_row.hbs @@ -2,7 +2,7 @@
{{#if user_list_style.WITH_STATUS}} - +
{{> user_full_name .}} @@ -18,7 +18,7 @@
-
+