compose: Fix compose fade not updating on deleting user pill.

This commit makes the compose.update_fade as an exported
function and adds the listener to update the fade manually
as deleting the pill was not calling this functions.

Fixes #18865
This commit is contained in:
Priyam Seth 2021-08-06 22:37:31 +05:30 committed by Tim Abbott
parent da815db372
commit 5a4318d046
2 changed files with 4 additions and 1 deletions

View File

@ -89,7 +89,7 @@ export function clear_preview_area() {
$("#compose .markdown_preview").show();
}
function update_fade() {
export function update_fade() {
if (!compose_state.composing()) {
return;
}

View File

@ -3,6 +3,7 @@ import $ from "jquery";
import render_input_pill from "../templates/input_pill.hbs";
import * as blueslip from "./blueslip";
import * as compose from "./compose";
import * as ui_util from "./ui_util";
// See https://zulip.readthedocs.io/en/latest/subsystems/input-pills.html
@ -355,6 +356,8 @@ export function create(opts) {
funcs.removePill(id);
$next.trigger("focus");
compose.update_fade();
});
store.$parent.on("click", function (e) {