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.

input_pill: Break import cycle with `compose_recipient.js`.

Lalit83e1d78b7b22
diff --git a/web/src/input_pill.js b/web/src/input_pill.js
index c6da225e2c8..0cebaa9dfca 100644
--- a/web/src/input_pill.js
+++ b/web/src/input_pill.js
@@ -5,7 +5,6 @@ import $ from "jquery";
import render_input_pill from "../templates/input_pill.hbs";
import * as blueslip from "./blueslip";
-import * as compose_recipient from "./compose_recipient";
import * as keydown_util from "./keydown_util";
import * as ui_util from "./ui_util";
@@ -164,6 +163,11 @@ export function create(opts) {
store.removePillFunction(pill);
}
+ // This is needed to run the "change" event handler registered in
+ // compose_recipient.js, which calls the `update_on_recipient_change` to update
+ // the compose_fade state.
+ store.$input.trigger("change");
+
return pill;
}
@@ -358,8 +362,6 @@ export function create(opts) {
funcs.removePill($pill[0]);
$next.trigger("focus");
-
- compose_recipient.update_on_recipient_change();
});
store.$parent.on("click", function (e) {