fix #698, replay scroll on iframe document
This commit is contained in:
@@ -1601,6 +1601,13 @@ export class Replayer {
|
|||||||
left: d.x,
|
left: d.x,
|
||||||
behavior: 'smooth',
|
behavior: 'smooth',
|
||||||
});
|
});
|
||||||
|
} else if (target.__sn.type === NodeType.Document) {
|
||||||
|
// nest iframe content document
|
||||||
|
((target as unknown) as Document).defaultView!.scrollTo({
|
||||||
|
top: d.y,
|
||||||
|
left: d.x,
|
||||||
|
behavior: 'smooth',
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
((target as Node) as Element).scrollTop = d.y;
|
((target as Node) as Element).scrollTop = d.y;
|
||||||
|
|||||||
Reference in New Issue
Block a user