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

[Bug]: maskInputFn is not called on inputs #1488

Open
1 task done
ericmeadows opened this issue May 29, 2024 · 0 comments
Open
1 task done

[Bug]: maskInputFn is not called on inputs #1488

ericmeadows opened this issue May 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ericmeadows
Copy link

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

What package is this bug report for?

rrweb-snapshot

Version

v1.1.3

Expected Behavior

I have created a maskInputFn, which should print the element, as well as ignore hidden elements...

Actual Behavior

No console logs appear, and the hidden fields come through, unmasked..

Steps to Reproduce

I have created a maskInputFn, which I would assume would sanitize my inputs, but the data is coming through...

Here's maskInputFn:

  function maskInputFn(text, element) {
    console.log("element", element);
    if (element.type === "hidden") {
      return "";
    }
    // Default to returning the original text
    return text;
  }

Here's the initialization:

rrwebRecord({
  emit(event) {
    console.log("emitting");
    cacheEvents(event);
  },
  maskInputOptions: { maskInputFn },
  maskInputFn
});

Testcase Gist URL

No response

Additional Information

This is extremely important for us to handle...

@ericmeadows ericmeadows added the bug Something isn't working label May 29, 2024
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

No branches or pull requests

1 participant