mirror of https://github.com/zulip/zulip.git
recent_topics: Extend persistent focus bug to all RT elements.
The bug fix for RT search, also needs to be applied to other elements. Fixes #19458.
This commit is contained in:
parent
2eaf869949
commit
c894f50f3c
|
@ -639,15 +639,19 @@ function filter_buttons() {
|
|||
}
|
||||
|
||||
export function hide() {
|
||||
// On firefox (and flaky on other browsers), focus
|
||||
// remains on the focused element even after it is hidden. We
|
||||
// forcefully blur it so that focus returns to the visible
|
||||
// focused element.
|
||||
const focused_element = $(document.activeElement);
|
||||
if ($("#recent_topics_view").has(focused_element)) {
|
||||
focused_element.trigger("blur");
|
||||
}
|
||||
|
||||
$("#message_view_header_underpadding").show();
|
||||
$("#message_feed_container").show();
|
||||
$("#recent_topics_view").hide();
|
||||
set_visible(false);
|
||||
// On firefox (and flaky on other browsers), focus
|
||||
// remains on search box even after it is hidden. We
|
||||
// forcefully blur it so that focus returns to the visible
|
||||
// focused element.
|
||||
$("#recent_topics_search").trigger("blur");
|
||||
|
||||
$(".header").css("padding-bottom", "10px");
|
||||
|
||||
|
|
Loading…
Reference in New Issue