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.

popovers: Introduce case sensitivity to move topic button behavior.

George A. Michel6c6986e2d31c
diff --git a/static/js/stream_popover.js b/static/js/stream_popover.js
index f40071d219c..c0a8eeaef41 100644
--- a/static/js/stream_popover.js
+++ b/static/js/stream_popover.js
@@ -417,9 +417,12 @@ function build_move_topic_to_stream_popover(e, current_stream_id, topic_name) {
function update_submit_button_disabled_state(select_stream_id) {
const {current_stream_id, new_topic_name, old_topic_name} = get_params_from_form();
+ // Unlike most topic comparisons in Zulip, we intentionally do
+ // a case-sensitive comparison, since adjusting the
+ // capitalization of a topic is a valid operation.
$("#move_topic_modal .dialog_submit_button")[0].disabled =
Number.parseInt(current_stream_id, 10) === Number.parseInt(select_stream_id, 10) &&
- new_topic_name.trim().toLowerCase() === old_topic_name.trim().toLowerCase();
+ new_topic_name.trim() === old_topic_name.trim();
}
function move_topic() {