fix scrolling failure on some websites (#369)

This commit is contained in:
LawyZheng
2024-05-27 15:28:41 +08:00
committed by GitHub
parent 20f6fd2a10
commit eab07939f5

View File

@@ -1184,7 +1184,7 @@ function removeBoundingBoxes() {
function scrollToTop(draw_boxes) {
removeBoundingBoxes();
window.scrollTo({ left: 0, top: 0, behavior: "instant" });
window.scroll({ left: 0, top: 0, behavior: "instant" });
if (draw_boxes) {
var elementsAndResultArray = buildTreeFromBody();
drawBoundingBoxes(elementsAndResultArray[0]);