Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
dom_selection: Select mousemove handlers on document.
Karl Stolleycacc89e4d077
diff --git a/web/src/activity.ts b/web/src/activity.tsindex d04aae8fb68..c393a9018c4 100644--- a/web/src/activity.ts+++ b/web/src/activity.ts@@ -192,7 +192,7 @@ export function mark_client_active(): void {}export function initialize(): void {- $("html").on("mousemove", () => {+ $(document).on("mousemove", () => {set_new_user_input(true);});diff --git a/web/tests/activity.test.cjs b/web/tests/activity.test.cjsindex 53999b80acc..aeba1ea2400 100644--- a/web/tests/activity.test.cjs+++ b/web/tests/activity.test.cjs@@ -740,6 +740,7 @@ test("update_presence_info", ({override, override_rewire}) => {});test("initialize", ({override, override_rewire}) => {+ override(document, "to_$", () => $("document-stub"));override(pm_list, "update_private_messages", noop);override(watchdog, "check_for_unsuspend", noop);override(buddy_list, "fill_screen_with_content", noop);@@ -828,7 +829,7 @@ test("initialize", ({override, override_rewire}) => {// Exercise the mousemove handler, which just// sets a flag.- $("html").get_on_handler("mousemove")();+ $(document).get_on_handler("mousemove")();clear();});