From 2541b9b090fbabdd47b6f0b70f86ce667f63b095 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Wed, 21 Nov 2018 12:32:22 +0100 Subject: [PATCH] Pagescroller - get scroll pos in src window (#3561) --- core/modules/utils/dom/scroller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/utils/dom/scroller.js b/core/modules/utils/dom/scroller.js index 80afa848b..8d64b2b2f 100644 --- a/core/modules/utils/dom/scroller.js +++ b/core/modules/utils/dom/scroller.js @@ -69,7 +69,7 @@ PageScroller.prototype.scrollIntoView = function(element,callback) { // Get the client bounds of the element and adjust by the scroll position var getBounds = function() { var clientBounds = typeof callback === 'function' ? callback() : element.getBoundingClientRect(), - scrollPosition = $tw.utils.getScrollPosition(); + scrollPosition = $tw.utils.getScrollPosition(srcWindow); return { left: clientBounds.left + scrollPosition.x, top: clientBounds.top + scrollPosition.y - offset,