mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
ui_report: Remove class when hiding the status element.
It is important to remove the class when hiding the status element to make sure that when showing status again by calling some other function than ui_report.message, for example using loading.make_indicator, the status text should not be styled as per the class used previously. One example can be that "Saving" text in indicator can be shown in "red" color, used for showing errors, if previously an error response was showed in that status element.
This commit is contained in:
@@ -27,7 +27,7 @@ export function message(
|
||||
.fadeTo(0, 1);
|
||||
if (remove_after !== undefined) {
|
||||
setTimeout(() => {
|
||||
$status_box.fadeOut(400);
|
||||
$status_box.fadeOut(400, () => $status_box.removeClass(cls));
|
||||
}, remove_after);
|
||||
}
|
||||
$status_box.addClass("show");
|
||||
|
||||
Reference in New Issue
Block a user