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: Don't process scroll events if Inbox is not visible.

Aman Agrawal9d3f8bff557e
diff --git a/web/src/inbox_ui.ts b/web/src/inbox_ui.ts
index b19c86ae356..271a3651aac 100644
--- a/web/src/inbox_ui.ts
+++ b/web/src/inbox_ui.ts
@@ -811,7 +811,9 @@ function is_list_focused(): boolean {
}
function get_all_rows(): JQuery {
- return $(".inbox-header, .inbox-row").not(".hidden_by_filters, .collapsed_container");
+ return $("#inbox-main .inbox-header, #inbox-main .inbox-row").not(
+ ".hidden_by_filters, .collapsed_container",
+ );
}
function get_row_index($elt: JQuery): number {
@@ -1369,7 +1371,7 @@ function center_focus_if_offscreen(): void {
function move_focus_to_visible_area(): void {
// Focus on the row below inbox filters if the focused
// row is not visible.
- if (!is_list_focused()) {
+ if (!is_visible() || !is_list_focused()) {
return;
}