mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	popovers: Close user popover when clicked on stream name.
Earlier, when a user clicked on any stream name from the user_popover, the stream page would open in the background, but the user popover wouldn't close. Fixed it by explicitly binding it to a click handler, which closes the user popover before redirecting to stream page.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							4cff56a47c
						
					
				
				
					commit
					8cd9fc7a74
				
			@@ -1132,10 +1132,17 @@ export function register_click_handlers() {
 | 
			
		||||
        e.preventDefault();
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    /* These click handlers are implemented as just deep links to the
 | 
			
		||||
     * relevant part of the Zulip UI, so we don't want preventDefault,
 | 
			
		||||
     * but we do want to close the modal when you click them. */
 | 
			
		||||
    $("body").on("click", "#user-profile-modal #name #edit-button", () => {
 | 
			
		||||
        hide_user_profile();
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    $("body").on("click", "#user-profile-modal .stream_list_item", () => {
 | 
			
		||||
        hide_user_profile();
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    $("body").on("click", ".compose_mobile_button", function (e) {
 | 
			
		||||
        show_mobile_message_buttons_popover(this);
 | 
			
		||||
        e.stopPropagation();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user