mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Pagescroller - get scroll pos in src window (#3561)
This commit is contained in:
parent
d55a498fca
commit
2541b9b090
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user