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.

settings_user: Fix event propagation for bot and user edit form modal.

Pragati Agrawald4535200227a
diff --git a/static/js/settings_users.js b/static/js/settings_users.js
index 7b67c663fb6..0ce894ec445 100644
--- a/static/js/settings_users.js
+++ b/static/js/settings_users.js
@@ -583,6 +583,8 @@ function handle_bot_owner_profile(tbody) {
function handle_human_form(tbody, status_field) {
tbody.on("click", ".open-user-form", function (e) {
+ e.stopPropagation();
+ e.preventDefault();
const user_id = parseInt($(e.currentTarget).attr("data-user-id"), 10);
const person = people.get_by_user_id(user_id);
@@ -617,6 +619,8 @@ function handle_human_form(tbody, status_field) {
function handle_bot_form(tbody, status_field) {
tbody.on("click", ".open-user-form", function (e) {
+ e.stopPropagation();
+ e.preventDefault();
const user_id = parseInt($(e.currentTarget).attr("data-user-id"), 10);
const bot = people.get_by_user_id(user_id);