From e601a872980c4300d7ab05a92d509044b44de834 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Thu, 27 Mar 2025 01:11:19 -0700 Subject: [PATCH] update window.scroll/scrollTo syntax (#2032) --- skyvern/webeye/scraper/domUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skyvern/webeye/scraper/domUtils.js b/skyvern/webeye/scraper/domUtils.js index ffa346a8..cbbc48a3 100644 --- a/skyvern/webeye/scraper/domUtils.js +++ b/skyvern/webeye/scraper/domUtils.js @@ -1959,9 +1959,9 @@ function removeBoundingBoxes() { function safeWindowScroll(x, y) { if (typeof window.scroll === "function") { - window.scroll(x, y, { behavior: "instant" }); + window.scroll({ left: x, top: y, behavior: "instant" }); } else if (typeof window.scrollTo === "function") { - window.scrollTo(x, y, { behavior: "instant" }); + window.scrollTo({ left: x, top: y, behavior: "instant" }); } else { console.error("window.scroll and window.scrollTo are both not supported"); }