mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
recent_topics: Fix partially hidden row sometimes in recent topics.
The top row of the RT can be hidden sometimes after scrolling down and then scrolling up. This is because the focus is applied before the row is rendered. Applying the focus after the topic row is rendered by the browser makes sure it is always visisble when it needs to be.
This commit is contained in:
@@ -66,7 +66,10 @@ function set_table_focus(row, col) {
|
||||
return true;
|
||||
}
|
||||
|
||||
topic_rows.eq(row).find(".recent_topics_focusable").eq(col).children().trigger("focus");
|
||||
// Setting focus after the render is complete doesn't partially hide the row from view.
|
||||
setTimeout(() => {
|
||||
topic_rows.eq(row).find(".recent_topics_focusable").eq(col).children().trigger("focus");
|
||||
}, 0);
|
||||
current_focus_elem = "table";
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user