unread_ops: Avoid jQuery sizzle extension :visible.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2025-05-15 18:41:54 -07:00
committed by Tim Abbott
parent 6c0e7b20f7
commit 8325a51750
2 changed files with 5 additions and 1 deletions

View File

@@ -817,7 +817,7 @@ export function viewport_is_visible_and_focused(): boolean {
overlays.any_active() ||
modals.any_active() ||
!is_window_focused() ||
!$("#message_feed_container").is(":visible")
$("#message_feed_container").css("display") === "none"
) {
return false;
}

View File

@@ -75,6 +75,10 @@ const denmark_stream = make_stream({
});
run_test("unread_ops", ({override}) => {
$("#message_feed_container").css = (property) => {
assert.equal(property, "display");
return "block";
};
stream_data.clear_subscriptions();
stream_data.add_sub(denmark_stream);
message_store.clear_for_testing();