Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
recent_topics: Set focus to filter button after click.
Aman Agrawalfd77ebcc2a67
diff --git a/static/js/click_handlers.js b/static/js/click_handlers.jsindex 69d1dbbde32..8be027ba89f 100644--- a/static/js/click_handlers.js+++ b/static/js/click_handlers.js@@ -418,6 +418,7 @@ export function initialize() {recent_topics_ui.change_focused_element($(e.target), "click");recent_topics_ui.set_filter(e.currentTarget.dataset.filter);recent_topics_ui.update_filters_view();+ recent_topics_ui.revive_current_focus();});$("body").on("click", "td.recent_topic_stream", (e) => {diff --git a/static/js/recent_topics_ui.js b/static/js/recent_topics_ui.jsindex e024922fffd..591302dea29 100644--- a/static/js/recent_topics_ui.js+++ b/static/js/recent_topics_ui.js@@ -162,7 +162,7 @@ export function get_focused_row_message() {return undefined;}-function revive_current_focus() {+export function revive_current_focus() {// After re-render, the current_focus_elem is no longer linked// to the focused element, this function attempts to revive the// link and focus to the element prior to the rerender.