recent_view_ui: Fix quick multiple page downs resulting in errors.

Fixes #27209

Since post_scroll__pre_render_callback is called to set
the correct focus, we don't need to set focus again here.

This was happening because `set_table_focus` relies on rows
being already rendered in the DOM which is not the case with
page down since rows are still being rendered by list widget
as we scroll down.

This code was the source of the error:
```
    if (new_scrollTop >= table_height) {
        row_focus = topics_widget.get_current_list().length - 1;
    }
```

row_focus set here is not rendered yet, hence making set focus
on search box.

But, since we set focus on table if user is scrolling, this
sets focus back on the table.
This commit is contained in:
Aman Agrawal 2023-10-15 08:54:13 +00:00 committed by Tim Abbott
parent 2348d6f1f9
commit 03ea1ce528
1 changed files with 0 additions and 2 deletions

View File

@ -1116,7 +1116,6 @@ function page_up_navigation() {
row_focus = 0; row_focus = 0;
} }
$scroll_container.scrollTop(new_scrollTop); $scroll_container.scrollTop(new_scrollTop);
set_table_focus(row_focus, col_focus);
} }
function page_down_navigation() { function page_down_navigation() {
@ -1130,7 +1129,6 @@ function page_down_navigation() {
row_focus = topics_widget.get_current_list().length - 1; row_focus = topics_widget.get_current_list().length - 1;
} }
$scroll_container.scrollTop(new_scrollTop); $scroll_container.scrollTop(new_scrollTop);
set_table_focus(row_focus, col_focus);
} }
function check_row_type_transition(row, col) { function check_row_type_transition(row, col) {