Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

compose: Fix opening stream picker by triggering click event.

Lalit2d118f098a10
diff --git a/web/src/compose_recipient.js b/web/src/compose_recipient.js
index 6ba2099fbf2..96be3843f72 100644
--- a/web/src/compose_recipient.js
+++ b/web/src/compose_recipient.js
@@ -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) {