mirror of https://github.com/zulip/zulip.git
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:
parent
ca99d62b4e
commit
c234b4f254
|
@ -709,7 +709,7 @@ exports.initialize = function () {
|
||||||
|
|
||||||
// This handler isn't part of the normal edit interface; it's the convenient
|
// This handler isn't part of the normal edit interface; it's the convenient
|
||||||
// checkmark in the subscriber list.
|
// 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);
|
const sub = get_sub_for_target(e.target);
|
||||||
// Makes sure we take the correct stream_row.
|
// Makes sure we take the correct stream_row.
|
||||||
const stream_row = $("#subscriptions_table div.stream-row[data-stream-id='" + sub.stream_id + "']");
|
const stream_row = $("#subscriptions_table div.stream-row[data-stream-id='" + sub.stream_id + "']");
|
||||||
|
|
Loading…
Reference in New Issue