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.

modals: Do not remove modal element from DOM after closing the modal.

sahil839748921376879
diff --git a/static/js/stream_edit.js b/static/js/stream_edit.js
index 1e87f3b051d..d2b825be842 100644
--- a/static/js/stream_edit.js
+++ b/static/js/stream_edit.js
@@ -587,7 +587,6 @@ function change_stream_privacy(e) {
if (Object.keys(data).length === 0) {
overlays.close_modal("#stream_privacy_modal");
- $("#stream_privacy_modal").remove();
return;
}
@@ -596,7 +595,6 @@ function change_stream_privacy(e) {
data,
success() {
overlays.close_modal("#stream_privacy_modal");
- $("#stream_privacy_modal").remove();
// The rest will be done by update stream event we will get.
},
error(xhr) {
@@ -882,7 +880,6 @@ export function initialize() {
$("#subscriptions_table").on("click", "#do_deactivate_stream_button", (e) => {
const stream_id = $(e.target).data("stream-id");
overlays.close_modal("#deactivation_stream_modal");
- $("#deactivation_stream_modal").remove();
if (!stream_id) {
ui_report.client_error(i18n.t("Invalid stream id"), $(".stream_change_property_info"));
return;
@@ -891,10 +888,6 @@ export function initialize() {
delete_stream(stream_id, $(".stream_change_property_info"), row);
});
- $("#subscriptions_table").on("hide.bs.modal", "#deactivation_stream_modal", () => {
- $("#deactivation_stream_modal").remove();
- });
-
$("#subscriptions_table").on("click", ".stream-row", function (e) {
if ($(e.target).closest(".check, .subscription_settings").length === 0) {
open_edit_panel_for_row(this);