popovers: Fix popovers not being hidden on scrolling.

This commit is contained in:
Aman Agrawal
2023-05-27 12:00:54 +05:30
committed by Tim Abbott
parent 66501a8eae
commit 6a5cfd2c05
2 changed files with 5 additions and 1 deletions

View File

@@ -1022,7 +1022,7 @@ export function register_click_handlers() {
{
let last_scroll = 0;
$(".app").on("scroll", () => {
$(document).on("scroll", () => {
if (suppress_scroll_hide) {
suppress_scroll_hide = false;
return;

View File

@@ -36,6 +36,10 @@ mock_esm("../src/stream_popover", {
hide_streamlist_sidebar: noop,
});
set_global("document", {
to_$: () => $("document-stub"),
});
const people = zrequire("people");
const user_status = zrequire("user_status");
const popovers = zrequire("popovers");