mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	stream_list: Scroll selected topic into view when zoomed in.
This is useful for keyboard users when use `n` to navigate to the next topic with zoomed in topic list.
This commit is contained in:
		@@ -780,6 +780,10 @@ export function handle_narrow_activated(
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (is_zoomed_in()) {
 | 
			
		||||
        topic_list.scroll_zoomed_in_topic_into_view();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function handle_message_view_deactivated(): void {
 | 
			
		||||
 
 | 
			
		||||
@@ -282,7 +282,7 @@ export function rebuild($stream_li: JQuery, stream_id: number): void {
 | 
			
		||||
    active_widgets.set(stream_id, widget);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function scroll_zoomed_in_topic_into_view(): void {
 | 
			
		||||
export function scroll_zoomed_in_topic_into_view(): void {
 | 
			
		||||
    const $selected_topic = $(".topic-list .topic-list-item.active-sub-filter");
 | 
			
		||||
    if ($selected_topic.length === 0) {
 | 
			
		||||
        // If we don't have a selected topic, scroll to top.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user