recent_topics: Set focus on input element on launch.

This commit is contained in:
Aman Agrawal 2020-06-05 14:38:20 +05:30 committed by Tim Abbott
parent ec00e39e45
commit 9b9154be91
2 changed files with 2 additions and 0 deletions

View File

@ -317,6 +317,7 @@ run_test("test_recent_topics_launch", () => {
rt.process_messages(messages); rt.process_messages(messages);
rt.launch(); rt.launch();
assert.equal($("#recent_topics_search").is(":focus"), true);
overlays.close_callback(); overlays.close_callback();
// incorrect topic_key // incorrect topic_key

View File

@ -323,6 +323,7 @@ exports.launch = function () {
}, },
}); });
recent_topics.complete_rerender(); recent_topics.complete_rerender();
$("#recent_topics_search").focus();
}; };
window.recent_topics = exports; window.recent_topics = exports;