From 3549164827808db825017f0f2ea21e1c86d62069 Mon Sep 17 00:00:00 2001 From: Sahil Batra Date: Thu, 18 Jan 2024 15:23:50 +0530 Subject: [PATCH] groups_settings: Make "Cancel" button work in group creation form. --- web/src/user_group_edit.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/src/user_group_edit.js b/web/src/user_group_edit.js index 3d2709f72b..9be50c145c 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", () => {