mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
subscriptions: Fix buggy behaviour of click event handlers.
This commit fixes a bug where clicking on a stream row on the left in the subscriptions table called the ".stream-row" as well as the ".sub_unsub_button" click events in `stream_edit.js`. This caused the stream subscription to toggle everytime the row was clicked. Also, this bug is only observed if the ".sub_unsub_button" had been clicked first.
This commit is contained in:
@@ -709,7 +709,7 @@ exports.initialize = function () {
|
||||
|
||||
// This handler isn't part of the normal edit interface; it's the convenient
|
||||
// checkmark in the subscriber list.
|
||||
$("#subscriptions_table").on("click", ".sub_unsub_button", (e) => {
|
||||
$("#subscriptions_table").on("click", ".check.sub_unsub_button", (e) => {
|
||||
const sub = get_sub_for_target(e.target);
|
||||
// Makes sure we take the correct stream_row.
|
||||
const stream_row = $("#subscriptions_table div.stream-row[data-stream-id='" + sub.stream_id + "']");
|
||||
|
||||
Reference in New Issue
Block a user