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.

groups_settings: Make "Cancel" button work in group creation form.

Sahil Batrabaad78aafd46
diff --git a/web/src/user_group_edit.js b/web/src/user_group_edit.js
index 3d2709f72b1..9be50c145cd 100644
--- a/web/src/user_group_edit.js
+++ b/web/src/user_group_edit.js
@@ -893,6 +893,16 @@ export function initialize() {
open_create_user_group();
});
+ $("#groups_overlay_container").on("click", "#user_group_creation_form [data-dismiss]", (e) => {
+ e.preventDefault();
+ // we want to make sure that the click is not just a simulated
+ // click; this fixes an issue where hitting "Enter" would
+ // trigger this code path due to bootstrap magic.
+ if (e.clientY !== 0) {
+ open_right_panel_empty();
+ }
+ });
+
$("#groups_overlay_container").on("click", ".group-row", show_right_section);
$("#groups_overlay_container").on("click", ".fa-chevron-left", () => {