diff --git a/web/src/stream_list.ts b/web/src/stream_list.ts index 4cf0f43049..728445f8d7 100644 --- a/web/src/stream_list.ts +++ b/web/src/stream_list.ts @@ -1256,6 +1256,11 @@ export function set_event_handlers({ if (e.metaKey || e.ctrlKey || e.shiftKey) { return; } + if (document.getSelection()?.type === "Range") { + // To avoid the click behavior if a channel name is selected. + e.preventDefault(); + return; + } const stream_id = stream_id_for_elt($(e.target).parents("li.narrow-filter")); on_sidebar_channel_click(stream_id, e, show_channel_feed); diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.css index ffa8fe171c..8040ca84a5 100644 --- a/web/styles/left_sidebar.css +++ b/web/styles/left_sidebar.css @@ -1549,6 +1549,7 @@ li.active-sub-filter { } .subscription_block { + user-select: text; grid-template-columns: var(--left-sidebar-toggle-width-offset) var( --left-sidebar-icon-column-width diff --git a/web/templates/stream_sidebar_row.hbs b/web/templates/stream_sidebar_row.hbs index 16ff540dfd..3c230451bd 100644 --- a/web/templates/stream_sidebar_row.hbs +++ b/web/templates/stream_sidebar_row.hbs @@ -2,7 +2,7 @@
  • - + {{> stream_privacy . }}