mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 12:03:46 +00:00 
			
		
		
		
	compose: Fix opening stream picker by triggering click event.
We should trigger click event to open up the dropdown popup instead of using
`.dropdown("toggle")` because we want to clear the search state when opening up
the popup and the logic for that is registered in `on-click` handler defined in
`dropdown_list_widget`.
Fixes: #25218
			
			
This commit is contained in:
		| @@ -94,7 +94,10 @@ export function open_compose_stream_dropup() { | ||||
|     if ($("#id_compose_select_stream").hasClass("open")) { | ||||
|         return; | ||||
|     } | ||||
|     $("#id_compose_select_stream > .dropdown-toggle").dropdown("toggle"); | ||||
|     // We trigger a click rather than directly toggling the element; | ||||
|     // this is important to ensure the filter text gets cleared when | ||||
|     // reopening the widget after previous use. | ||||
|     $("#id_compose_select_stream > .dropdown-toggle").trigger("click"); | ||||
| } | ||||
|  | ||||
| export function on_compose_select_stream_update(new_value) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user