-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 element masking with :not selectors #20100
Comments
@pauldambra Hey I've run in to the same issue! I tried using the example in the docs
But that didn't work. Looks like the use of
Stops it from working. I've tried:
But if I am hiding just selective items (instead of the inverse with :not) then it works. IE using:
I'm using tailwind and next.js I wonder if that is an issue? What other information can I provide? Do you know when this might be worked on? Thanks |
hey @FreddieHoy thanks for letting us know... we're going to focus on "correctness" for a few sprints so might be able to pull this in... When I made a little reproduction using basic html in htmlfiddle the (cc @daibhin) |
Hey @pauldambra! |
@pauldambra - I've thrown together a repo 😂 thought this was the simplest way to do it while being close to the issue I have. I've left STR in the Readme. Let me know if there are any issues and your able to replicate. Thanks |
^^^ @daibhin (in case you can look at this today :)) |
Great, thanks @FreddieHoy! Let me reproduce this today and find out where the selector isn't matching |
This is caused by a bug in our underlying recording tool (rrweb) The elements are correctly evaluated (the "visible" text returns I think this bug might have been inadvertently resolved by rrweb-io/rrweb#1349. We're in the process of upgrading to the latest version which includes that change. I will prioritise that upgrade and test this again once shipped |
@daibhin @pauldambra Fantastic news, thanks for being so quick on this! Legends 🙌 |
Have an update to the docs ready to go so closing this one out |
@daibhin This still isn't working and I think needs to be reopened. Your proposed solution with I'm on the latest version of the posthog package and I have a screenshot of the session recording option types: |
@mwalcher ah, I think that might just be a typing issue on our end! You can see that the rrweb method does pass out the parent element: https://github.com/rrweb-io/rrweb/blob/master/packages/rrweb-snapshot/src/types.ts#L158 Will reopen until we get PostHog/posthog-js#1122 over the line |
Just checked on the latest version of posthog-js ( |
Thank you for resolving that so quickly @daibhin! I've updated to the latest version and everything is working as expected now. I just had a suggestion for the docs because I think it will be handy for others as well. I want to use the data attribute to unmask sections of the page, so I'll add the data attribute to a parent element and everything nested in that element will be unmasked. This is the code I'm using for the
The key here is using |
Hi there, one question: I am using the hobby deployment, and I had this exact problem. The changelog has no mention of this fix, so I am not sure if it applies for hobby deployment or not. If I use the |
@lobaorn it will depend on the version of the |
see
we've had two reports that masking elements using a :not selector didn't work for the user
a quick check with jsbin showed it working for a trivial example, but two reports is suspicious and we should dig in more thoroughly
e.g.
The text was updated successfully, but these errors were encountered: