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

logging-improvements
BurningTreeC 2018-11-21 12:32:22 +01:00 zatwierdzone przez Jeremy Ruston
rodzic d55a498fca
commit 2541b9b090
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

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