Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rrdom bugs #1222

Merged
merged 5 commits into from
Jun 2, 2023
Merged

Fix rrdom bugs #1222

merged 5 commits into from
Jun 2, 2023

Conversation

YunFeng0817
Copy link
Member

@YunFeng0817 YunFeng0817 commented May 10, 2023

Changes

  1. Fix a bug in the diff algorithm
  2. Omit the 'srcdoc' attribute of iframes to avoid overwriting content.
  3. Add test cases

Bug description

image

The error happened at this place in rrdom:

image I've constructed a test case that can reproduce the bug. The simple explanation for this is: A child is appended to another parent node during the process of diffChildren().

@changeset-bot
Copy link

changeset-bot bot commented May 10, 2023

🦋 Changeset detected

Latest commit: b46247f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
rrdom Patch
rrweb Patch
rrweb-snapshot Patch
rrdom-nodejs Patch
rrweb-player Patch
@rrweb/types Patch
@rrweb/web-extension Patch
rrvideo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@YunFeng0817 YunFeng0817 added the bug Something isn't working label May 10, 2023
@YunFeng0817 YunFeng0817 requested a review from Juice10 May 12, 2023 03:08
@Juice10 Juice10 merged commit b798f2d into master Jun 2, 2023
@Juice10 Juice10 deleted the fix-rrdom branch June 2, 2023 09:44
eoghanmurray pushed a commit to eoghanmurray/rrweb that referenced this pull request Jul 27, 2023
* fix: rrdom bug

1. fix one bug of the diff algorithm
2. omit srcdoc attribute of iframe

* use linked list to iterate children

* fix the bug that the children of shadowRoot don't get diffed

* add test cases

* add change log
eoghanmurray pushed a commit to eoghanmurray/rrweb that referenced this pull request Jul 27, 2023
* fix: rrdom bug

1. fix one bug of the diff algorithm
2. omit srcdoc attribute of iframe

* use linked list to iterate children

* fix the bug that the children of shadowRoot don't get diffed

* add test cases

* add change log
eoghanmurray pushed a commit to eoghanmurray/rrweb that referenced this pull request Jul 27, 2023
* fix: rrdom bug

1. fix one bug of the diff algorithm
2. omit srcdoc attribute of iframe

* use linked list to iterate children

* fix the bug that the children of shadowRoot don't get diffed

* add test cases

* add change log
eoghanmurray pushed a commit to eoghanmurray/rrweb that referenced this pull request Aug 3, 2023
* fix: rrdom bug

1. fix one bug of the diff algorithm
2. omit srcdoc attribute of iframe

* use linked list to iterate children

* fix the bug that the children of shadowRoot don't get diffed

* add test cases

* add change log
eoghanmurray pushed a commit to eoghanmurray/rrweb that referenced this pull request Aug 8, 2023
* fix: rrdom bug

1. fix one bug of the diff algorithm
2. omit srcdoc attribute of iframe

* use linked list to iterate children

* fix the bug that the children of shadowRoot don't get diffed

* add test cases

* add change log
eoghanmurray pushed a commit to eoghanmurray/rrweb that referenced this pull request Aug 8, 2023
* fix: rrdom bug

1. fix one bug of the diff algorithm
2. omit srcdoc attribute of iframe

* use linked list to iterate children

* fix the bug that the children of shadowRoot don't get diffed

* add test cases

* add change log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants