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.

dialog_widget: Fix race focusing submit button.

Tim Abbotte0135e278d67
diff --git a/static/js/dialog_widget.js b/static/js/dialog_widget.js
index 4cafb649458..7d5755118bb 100644
--- a/static/js/dialog_widget.js
+++ b/static/js/dialog_widget.js
@@ -131,12 +131,12 @@ export function launch(conf) {
dialog.remove();
});
- // Open the modal
- overlays.open_modal("#dialog_widget_modal");
-
if (conf.focus_submit_on_open) {
conf.parent.on("shown.bs.modal", () => {
submit_button.trigger("focus");
});
}
+
+ // Open the modal
+ overlays.open_modal("#dialog_widget_modal");
}