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:
Ganesh Pawar
2021-04-29 12:03:00 +05:30
committed by Tim Abbott
parent 6e4735a4e9
commit fe147757c9
6 changed files with 16 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ import render_message_edit_history from "../templates/message_edit_history.hbs";
import * as channel from "./channel";
import {$t_html} from "./i18n";
import * as overlays from "./overlays";
import * as people from "./people";
import * as timerender from "./timerender";
import * as ui_report from "./ui_report";
@@ -74,6 +75,6 @@ export function fetch_and_render_message_history(message) {
export function show_history(message) {
$("#message-history").html("");
$("#message-edit-history").modal("show");
overlays.open_modal("#message-edit-history");
fetch_and_render_message_history(message);
}