mirror of https://github.com/zulip/zulip.git
recent_topics: Don't process hotkeys in empty table.
The fixes errors when we are trying process user input before anything is initialized in recent topics.
This commit is contained in:
parent
2d31b52927
commit
5ee78fc14c
|
@ -1038,6 +1038,11 @@ export function change_focused_element($elt, input_key) {
|
|||
return true;
|
||||
}
|
||||
} else if (is_table_focused()) {
|
||||
// Don't process hotkeys in table if there are no rows.
|
||||
if (!topics_widget || topics_widget.get_current_list().length === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// For arrowing around the table of topics, we implement left/right
|
||||
// wraparound. Going off the top or the bottom takes one
|
||||
// to the navigation at the top (see set_table_focus).
|
||||
|
|
Loading…
Reference in New Issue