diff --git a/src/core/scroller.ts b/src/core/scroller.ts index da6f7489..aff9063a 100644 --- a/src/core/scroller.ts +++ b/src/core/scroller.ts @@ -384,6 +384,8 @@ export const createWindowScroller = ( isHorizontal: boolean, offset: number = 0 ): number => { + window = getCurrentWindow(getCurrentDocument(node)) + // TODO calc offset only when it changes (maybe impossible) const offsetKey = isHorizontal ? "offsetLeft" : "offsetTop"; const offsetSum =