mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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 <apoorvavpendse@gmail.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							1ce2c96eee
						
					
				
				
					commit
					b8e09b3c35
				
			@@ -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",
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -2,13 +2,13 @@
 | 
			
		||||
 | 
			
		||||
<li class="narrow-filter{{#if is_muted}} out_of_home_view{{/if}}" data-stream-id="{{id}}">
 | 
			
		||||
    <div class="bottom_left_row">
 | 
			
		||||
        <div class="subscription_block selectable_sidebar_block {{#if hide_unread_count}}hide_unread_counts{{/if}}">
 | 
			
		||||
        <a href="{{url}}" class="subscription_block selectable_sidebar_block {{#if hide_unread_count}}hide_unread_counts{{/if}}">
 | 
			
		||||
 | 
			
		||||
            <span class="stream-privacy-original-color-{{id}} stream-privacy filter-icon" style="color: {{color}}">
 | 
			
		||||
                {{> stream_privacy . }}
 | 
			
		||||
            </span>
 | 
			
		||||
 | 
			
		||||
            <a href="{{url}}" class="stream-name">{{name}}</a>
 | 
			
		||||
            <span class="stream-name">{{name}}</span>
 | 
			
		||||
 | 
			
		||||
            <div class="left-sidebar-controls">
 | 
			
		||||
                {{#if can_post_messages}}
 | 
			
		||||
@@ -27,6 +27,6 @@
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            <span class="sidebar-menu-icon stream-sidebar-menu-icon"><i class="zulip-icon zulip-icon-more-vertical" aria-hidden="true"></i></span>
 | 
			
		||||
        </div>
 | 
			
		||||
        </a>
 | 
			
		||||
    </div>
 | 
			
		||||
</li>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user