mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	compose_actions: Fix automated scroll when resizing compose.
This code has been inoperative since 86073588be
upgraded the autosize library without migrating this event.
			
			
This commit is contained in:
		@@ -93,13 +93,16 @@ function clear_box() {
 | 
			
		||||
    $(".compose_control_button_container:has(.add-poll)").removeClass("disabled-on-hover");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
let autosize_callback_opts;
 | 
			
		||||
export function autosize_message_content(opts) {
 | 
			
		||||
    if (!compose_ui.is_full_size()) {
 | 
			
		||||
        autosize($("textarea#compose-textarea"), {
 | 
			
		||||
            callback() {
 | 
			
		||||
                maybe_scroll_up_selected_message(opts);
 | 
			
		||||
            },
 | 
			
		||||
        });
 | 
			
		||||
        autosize_callback_opts = opts;
 | 
			
		||||
        $("textarea#compose-textarea")
 | 
			
		||||
            .off("autosize:resized")
 | 
			
		||||
            .one("autosize:resized", () => {
 | 
			
		||||
                maybe_scroll_up_selected_message(autosize_callback_opts);
 | 
			
		||||
            });
 | 
			
		||||
        autosize($("textarea#compose-textarea"));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user