rrweb
rrweb copied to clipboard
[Bug]: maskInputFn is ignored during the creation of the full snapshot
Preflight Checklist
- [X] 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
Version
2.0.0-alpha.11
Expected Behavior
The maskInputFn setting must be applied for masking during the creation of the full snapshot.
Actual Behavior
The maskInputFn setting is ignored.
Steps to Reproduce
- Create a simple page that contains an
inputwith some value. E.g.
<body>
<input type="text" value="some text value">
</body>
- Configure recorder to mask all elements except specified in the
maskInputFn
maskAllInputs: true,
maskInputFn(value, element) {
// ... the logic to skip masking for our text input
return value;
}
- Record the page loading and replay events. The initial input's text is masked in the recorded video. The element only gets unmasked if you start editing its value.
Testcase Gist URL
No response
Additional Information
I checked the code and it looks like maskInputFn setting is ignored for the full snapshot creation.