Skip to content

Commit

Permalink
Need to look at the top document to be able to capture page scrolls also
Browse files Browse the repository at this point in the history
  • Loading branch information
eoghanmurray committed Aug 26, 2020
1 parent 4a602b9 commit 46b2d38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { INode } from 'rrweb-snapshot';
export function on(
type: string,
fn: EventListenerOrEventListenerObject,
target: Document | Window = document,
target: Document | Window = getTopWindow().document,
): listenerHandler {
const options = { capture: true, passive: true };
target.addEventListener(type, fn, options);
Expand Down

0 comments on commit 46b2d38

Please sign in to comment.