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.

condense: Add missing stopPropagation/preventDefault.

Tim Abbott35023824b098
diff --git a/static/js/condense.js b/static/js/condense.js
index 0a69bd4009d..8ce64335229 100644
--- a/static/js/condense.js
+++ b/static/js/condense.js
@@ -235,7 +235,7 @@ exports.condense_and_collapse = function (elems) {
};
exports.initialize = function () {
- $("#home").on("click", ".message_expander", function () {
+ $("#home").on("click", ".message_expander", function (e) {
// Expanding a message can mean either uncollapsing or
// uncondensing it.
const row = $(this).closest(".message_row");
@@ -251,12 +251,16 @@ exports.initialize = function () {
$(this).hide();
row.find(".message_condenser").show();
}
+ e.stopPropagation();
+ e.preventDefault();
});
- $("#home").on("click", ".message_condenser", function () {
+ $("#home").on("click", ".message_condenser", function (e) {
const row = $(this).closest(".message_row");
current_msg_list.get(rows.id(row)).condensed = true;
condense_row(row);
+ e.stopPropagation();
+ e.preventDefault();
});
};