mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
refactor: Migrate Bootstrap modal calls to overlay calls.
In d0f8515b50, it was noticed that
Bootstrap's `hide` and `show` calls can cause race conditions.
So, migrate to our `overlay` calls to handle Bootstrap modals.
This commit is contained in:
@@ -558,7 +558,7 @@ export function set_up() {
|
||||
// will not show up because of a call to `close_active_modal` in `settings.js`.
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
$("#deactivate_self_modal").modal("show");
|
||||
overlays.open_modal("#deactivate_self_modal");
|
||||
});
|
||||
|
||||
$("#account-settings").on("click", ".custom_user_field .remove_date", (e) => {
|
||||
@@ -598,7 +598,7 @@ export function set_up() {
|
||||
channel.del({
|
||||
url: "/json/users/me",
|
||||
success() {
|
||||
$("#deactivate_self_modal").modal("hide");
|
||||
overlays.close_modal("#deactivate_self_modal");
|
||||
window.location.href = "/login/";
|
||||
},
|
||||
error(xhr) {
|
||||
@@ -623,7 +623,7 @@ export function set_up() {
|
||||
rendered_error_msg = error_last_user;
|
||||
}
|
||||
}
|
||||
$("#deactivate_self_modal").modal("hide");
|
||||
overlays.close_modal("#deactivate_self_modal");
|
||||
$("#account-settings-status")
|
||||
.addClass("alert-error")
|
||||
.html(rendered_error_msg)
|
||||
|
||||
Reference in New Issue
Block a user