From 46c72fd17db1771514f06e9a7e893f665eb8ee97 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 5 Apr 2021 17:38:57 -0700 Subject: [PATCH] stream_popover: Specify topic when opening compose. This fixes a bug I introduced when merging 86eccfd20f6c7ce2b148afe7fa2a2a1c47cde9a1, by not using the "new topic button" trigger. It would probably be wise to replace that "trigger" system with just passing actual options, as it's pretty confusing. --- static/js/stream_popover.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/stream_popover.js b/static/js/stream_popover.js index a8f5ee8017..7e9cf80eec 100644 --- a/static/js/stream_popover.js +++ b/static/js/stream_popover.js @@ -477,7 +477,11 @@ export function register_stream_handlers() { const sub = stream_popover_sub(e); hide_stream_popover(); - compose_actions.start("stream", {trigger: "popover new topic button", stream: sub.name}); + compose_actions.start("stream", { + trigger: "popover new topic button", + stream: sub.name, + topic: "", + }); e.preventDefault(); e.stopPropagation(); });