mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	recent_topics: Extend persistent focus bug to all RT elements.
The bug fix for RT search, also needs to be applied to other elements. Fixes #19458.
This commit is contained in:
		@@ -639,15 +639,19 @@ function filter_buttons() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function hide() {
 | 
			
		||||
    // On firefox (and flaky on other browsers), focus
 | 
			
		||||
    // remains on the focused element even after it is hidden. We
 | 
			
		||||
    // forcefully blur it so that focus returns to the visible
 | 
			
		||||
    // focused element.
 | 
			
		||||
    const focused_element = $(document.activeElement);
 | 
			
		||||
    if ($("#recent_topics_view").has(focused_element)) {
 | 
			
		||||
        focused_element.trigger("blur");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $("#message_view_header_underpadding").show();
 | 
			
		||||
    $("#message_feed_container").show();
 | 
			
		||||
    $("#recent_topics_view").hide();
 | 
			
		||||
    set_visible(false);
 | 
			
		||||
    // On firefox (and flaky on other browsers), focus
 | 
			
		||||
    // remains on search box even after it is hidden. We
 | 
			
		||||
    // forcefully blur it so that focus returns to the visible
 | 
			
		||||
    // focused element.
 | 
			
		||||
    $("#recent_topics_search").trigger("blur");
 | 
			
		||||
 | 
			
		||||
    $(".header").css("padding-bottom", "10px");
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user