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.

inbox_ui: Use same type of item in `cols_to_focus`.

Aman Agrawalc7eca03b68a4
diff --git a/web/src/inbox_ui.ts b/web/src/inbox_ui.ts
index 846d99521c8..12134a972a8 100644
--- a/web/src/inbox_ui.ts
+++ b/web/src/inbox_ui.ts
@@ -1014,8 +1014,8 @@ function set_list_focus(input_key?: string): void {
// This includes a fake collapse button for `inbox-row` and a fake topic visibility
// button for `inbox-header`. The fake buttons help simplify code here and
// `$($cols_to_focus[col_focus]).trigger("focus");` at the end of this function.
- const $cols_to_focus = [$row_to_focus, ...$row_to_focus.find("[tabindex=0]")];
- const total_cols = $cols_to_focus.length;
+ const cols_to_focus = [row_to_focus, ...$row_to_focus.find("[tabindex=0]")];
+ const total_cols = cols_to_focus.length;
current_focus_id = $row_to_focus.attr("id");
const is_header_row = is_row_a_header($row_to_focus);
update_closed_compose_text($row_to_focus, is_header_row);
@@ -1062,7 +1062,7 @@ function set_list_focus(input_key?: string): void {
}
}
- const col_to_focus = $cols_to_focus[col_focus];
+ const col_to_focus = cols_to_focus[col_focus];
assert(col_to_focus !== undefined);
$(col_to_focus).trigger("focus");
}