From 663743261a1168951eca118d1b23db5631d59e73 Mon Sep 17 00:00:00 2001 From: Ganesh Pawar Date: Thu, 24 Jun 2021 22:19:42 +0530 Subject: [PATCH] recent_topics: Return false in `is_in_focus` if a modal is present. This prevents a bug where keypresses are received by recent_topics view even if a modal is present on it, which prevents, for instance, the modal from receiving text input. --- static/js/recent_topics_util.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/js/recent_topics_util.js b/static/js/recent_topics_util.js index c2a07e82aa..4278aeb67a 100644 --- a/static/js/recent_topics_util.js +++ b/static/js/recent_topics_util.js @@ -16,6 +16,7 @@ export function is_in_focus() { !compose_state.composing() && !popovers.any_active() && !overlays.is_active() && + !overlays.is_modal_open() && !$(".home-page-input").is(":focus") ); }