mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			521 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			521 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import $ from "jquery";
 | 
						|
 | 
						|
const list_selectors = ["#stream_filters", "#global_filters", "#user_presences"];
 | 
						|
 | 
						|
export function inside_list(e) {
 | 
						|
    const $target = $(e.target);
 | 
						|
    const in_list = $target.closest(list_selectors.join(", ")).length > 0;
 | 
						|
    return in_list;
 | 
						|
}
 | 
						|
 | 
						|
export function go_down(e) {
 | 
						|
    const $target = $(e.target);
 | 
						|
    $target.closest("li").next().find("a").trigger("focus");
 | 
						|
}
 | 
						|
 | 
						|
export function go_up(e) {
 | 
						|
    const $target = $(e.target);
 | 
						|
    $target.closest("li").prev().find("a").trigger("focus");
 | 
						|
}
 |