mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
Fix floating recipient bar being unnarrowable.
When we switched to delegated event handling, the bound handler for all of our events was #main_div, but the floating recipient bar lives outside of #main_div. Additionally, the bar needs to inherit the zid from the target recipient bar since it is used for the narrow. (imported from commit 7c18e16f2e98436888a8edb81fbbdd4d17abfe2a)
This commit is contained in:
@@ -122,11 +122,13 @@ function replace_floating_recipient_bar(desired_label) {
|
||||
desired_label.children(".message_header_stream.right_part").clone());
|
||||
$("#current_label_huddle").css('display', 'none');
|
||||
$("#current_label_stream").css('display', 'table-row');
|
||||
$("#current_label_stream").attr("zid", desired_label.attr("zid"));
|
||||
} else {
|
||||
$("#current_label_huddle td:last").replaceWith(
|
||||
desired_label.children(".message_header_huddle.right_part").clone());
|
||||
$("#current_label_stream").css('display', 'none');
|
||||
$("#current_label_huddle").css('display', 'table-row');
|
||||
$("#current_label_huddle").attr("zid", desired_label.attr("zid"));
|
||||
}
|
||||
old_label = desired_label;
|
||||
}
|
||||
@@ -547,13 +549,13 @@ $(function () {
|
||||
}
|
||||
});
|
||||
|
||||
$("#main_div").on("click", ".narrows_by_recipient", function (e) {
|
||||
$("#home").on("click", ".narrows_by_recipient", function (e) {
|
||||
var row = $(this).closest(".recipient_row");
|
||||
narrow.target(row.attr('zid'));
|
||||
narrow.by_recipient();
|
||||
});
|
||||
|
||||
$("#main_div").on("click", ".narrows_by_subject", function (e) {
|
||||
$("#home").on("click", ".narrows_by_subject", function (e) {
|
||||
var row = $(this).closest(".recipient_row");
|
||||
narrow.target(row.attr('zid'));
|
||||
narrow.by_subject();
|
||||
|
||||
Reference in New Issue
Block a user