Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-virtual-dom-backward-skip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"rrweb": patch
---

Fix playback stopping when skipping backwards with useVirtualDom enabled
7 changes: 4 additions & 3 deletions packages/rrweb/src/replay/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,8 @@ export class Replayer {
console.warn(e);
}

this.virtualDom.destroyTree();
this.usingVirtualDom = false;

// If these legacy missing nodes haven't been resolved, they should be converted to real Nodes.
// This must happen before destroyTree() which resets the virtual DOM mirror.
if (Object.keys(this.legacy_missingNodeRetryMap).length) {
for (const key in this.legacy_missingNodeRetryMap) {
try {
Expand All @@ -292,6 +290,9 @@ export class Replayer {
}
}

this.virtualDom.destroyTree();
this.usingVirtualDom = false;

this.constructedStyleMutations.forEach((data) => {
this.applyStyleSheetMutation(data);
});
Expand Down