diff --git a/web/src/recent_topics_ui.js b/web/src/recent_topics_ui.js index 3acee67be8..9aa1a23a8d 100644 --- a/web/src/recent_topics_ui.js +++ b/web/src/recent_topics_ui.js @@ -768,7 +768,7 @@ function recenter_focus_if_off_screen() { const table_wrapper_element = document.querySelector("#recent_topics_table .table_fix_head"); const $topic_rows = $("#recent_topics_table table tbody tr"); - if (row_focus > $topic_rows.length) { + if (row_focus >= $topic_rows.length) { // User used a filter which reduced // the number of visible rows. return;