From b8e09b3c35b255d33568b6dfe36da1f46dfb5a07 Mon Sep 17 00:00:00 2001 From: apoorvapendse Date: Thu, 12 Jun 2025 23:02:24 +0530 Subject: [PATCH] left_sidebar: Support channel-row clicks on the left. Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/Clicking.20the.20right.20end.20of.20DM.20list.20items.20doesn't.20work/near/2192449. Reference: https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation Signed-off-by: apoorvapendse --- web/src/click_handlers.ts | 1 + web/src/stream_popover.ts | 1 + web/styles/left_sidebar.css | 15 +++++++++++++++ web/templates/stream_sidebar_row.hbs | 6 +++--- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/web/src/click_handlers.ts b/web/src/click_handlers.ts index 81c8972ccf..2d6995afc2 100644 --- a/web/src/click_handlers.ts +++ b/web/src/click_handlers.ts @@ -664,6 +664,7 @@ export function initialize(): void { // Left sidebar channel rows $("body").on("click", ".channel-new-topic-button", function (this: HTMLElement, e) { e.stopPropagation(); + e.preventDefault(); const stream_id = Number.parseInt(this.dataset.streamId!, 10); compose_actions.start({ message_type: "stream", diff --git a/web/src/stream_popover.ts b/web/src/stream_popover.ts index 7875f0b291..a1f06564d5 100644 --- a/web/src/stream_popover.ts +++ b/web/src/stream_popover.ts @@ -1115,6 +1115,7 @@ export async function build_move_topic_to_stream_popover( export function initialize(): void { $("#stream_filters").on("click", ".stream-sidebar-menu-icon", function (this: HTMLElement, e) { + e.preventDefault(); const $stream_li = $(this).parents("li"); const stream_id = elem_to_stream_id($stream_li); diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.css index 76e48f8a1f..b697ad9cb5 100644 --- a/web/styles/left_sidebar.css +++ b/web/styles/left_sidebar.css @@ -1114,6 +1114,21 @@ li.top_left_scheduled_messages { minmax(0, max-content) var(--left-sidebar-vdots-width) 0; white-space: nowrap; + text-decoration: none; + color: inherit; + + &:hover { + opacity: 1; + text-decoration: none; + color: inherit; + } + + &:not(:active):focus { + text-decoration: none; + border: none; + outline: none; + color: inherit; + } .stream-privacy { grid-area: starting-anchor-element; diff --git a/web/templates/stream_sidebar_row.hbs b/web/templates/stream_sidebar_row.hbs index db6ef26afe..2809acf9d8 100644 --- a/web/templates/stream_sidebar_row.hbs +++ b/web/templates/stream_sidebar_row.hbs @@ -2,13 +2,13 @@
  • -
    + {{> stream_privacy . }} - {{name}} + {{name}} -
    +