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

RRWeb replayer issue with CSSStyleSheetRule insertion replay #525

Closed
VladimirMilenko opened this issue Mar 29, 2021 · 2 comments
Closed

Comments

@VladimirMilenko
Copy link
Contributor

I did a couple of tests with styletron CSS in JS library and it appears, that the replay's snapshot functionality is not handling the CSS stylesheetrule insertions correctly when replayed from a certain point.
This seem to be, that snapshot is not correctly handling CSSStyleSheetRule insertion (original issue: #104)

Codesandbox with events and replayer:
https://codesandbox.io/s/trusting-diffie-cwwyq?file=/public/index.html

Replay is available here:
https://user-images.githubusercontent.com/18203255/112888359-8a23ca80-90d4-11eb-832b-3260fd692ff7.mov

@VladimirMilenko
Copy link
Contributor Author

So, I did some dubigging.
It seems that issue is originating in:

        if (usingVirtualParent && placeholderNode) { // here
          parent.replaceChild(target, placeholderNode);
        }

After replacement, the target's sheet is becoming null. And therefore, the style doesn't apply. I tried to simply remove that code and i can see, that node is containing all styles no matter the start position

@Yuyz0112
Copy link
Member

I think this can be closed now:)

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 a pull request may close this issue.

2 participants