recent_topics: Don't revive focus when user is trying to type.

This commit is contained in:
Aman Agrawal
2021-02-15 14:33:37 +00:00
committed by Tim Abbott
parent 3e36fe6a1e
commit a210ee2b7d
4 changed files with 9 additions and 3 deletions

View File

@@ -78,6 +78,12 @@ 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.
// Don't change focus if user is trying to type anywhere.
if ($(".home-page-input").is(":focus")) {
return false;
}
if (!current_focus_elem) {
set_default_focus();
return false;