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

Keep blocked root elements as placeholders #696

Merged
merged 2 commits into from
Sep 13, 2021

Conversation

Juice10
Copy link
Contributor

@Juice10 Juice10 commented Sep 10, 2021

According to our documentation:

An element with the class name .rr-block will not be recorded. Instead, it will replay as a placeholder with the same dimension.

Currently incremental snapshots are completely removing these blocked elements from being recorded.
And in full snapshots these blocked elements are stripped of their children and turned into placeholders.

This PR makes that behaviour consistent between different types of snapshots and mutations.

`serializeNode` turns blocked elements into placeholder nodes so we need to make sure we don't remove these elements from the mutations when they get added.
We do however need to keep removing any children of these blocked elements from getting added or mutated.
@Juice10 Juice10 requested a review from Yuyz0112 September 10, 2021 15:21
@Yuyz0112
Copy link
Member

Thanks and LGTM!~

@Yuyz0112 Yuyz0112 merged commit e630cfb into rrweb-io:master Sep 13, 2021
@Juice10 Juice10 deleted the consistent-blocking branch September 14, 2021 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants