1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-09-01 10:28:03 +00:00

Pagescroller - get scroll pos in src window (#3561)

This commit is contained in:
BurningTreeC
2018-11-21 12:32:22 +01:00
committed by Jeremy Ruston
parent d55a498fca
commit 2541b9b090

View File

@@ -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,