From 2a35b39c467c301ef04bfee11b0ec256f7ba0e63 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 3 Jun 2021 11:11:27 +0200 Subject: [PATCH] Remove the unused `dataset` checks from the `scrollIntoView` helper function This code was added in PR 3968, apparently in order to fix scrolling of search results in HiDPI-mode. However, after PR 4570 nothing is setting these `dataset`-properties any more and this is thus dead code which should be removed. (If that change had broken scrolling of search results in HiDPI-mode, you'd really expect that it'd been reported and fixed a long time ago.) --- web/ui_utils.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/web/ui_utils.js b/web/ui_utils.js index 3d7634bb0..47b7a9feb 100644 --- a/web/ui_utils.js +++ b/web/ui_utils.js @@ -117,12 +117,9 @@ function scrollIntoView(element, spot, skipOverflowHiddenElements = false) { (skipOverflowHiddenElements && getComputedStyle(parent).overflow === "hidden") ) { - if (parent.dataset._scaleY) { - offsetY /= parent.dataset._scaleY; - offsetX /= parent.dataset._scaleX; - } offsetY += parent.offsetTop; offsetX += parent.offsetLeft; + parent = parent.offsetParent; if (!parent) { return; // no need to scroll